summaryrefslogtreecommitdiff
path: root/modules/image
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-12-25 19:07:29 -0500
committerDavid Rothstein <drothstein@gmail.com>2013-12-25 19:07:29 -0500
commita5a14f9621af2db6fd2ab7a79cd6115ca2eb05c4 (patch)
treea3a637b4d6c69d0d0102afdb6996c2caf6f35486 /modules/image
parent08c95382f7be3adfd4c1cb900f222d6da7ca4056 (diff)
downloadbrdo-a5a14f9621af2db6fd2ab7a79cd6115ca2eb05c4.tar.gz
brdo-a5a14f9621af2db6fd2ab7a79cd6115ca2eb05c4.tar.bz2
Issue #2079315 by mondrake: Image style editing leads to redundant watchdog entries.
Diffstat (limited to 'modules/image')
-rw-r--r--modules/image/image.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/image/image.module b/modules/image/image.module
index b3ba7c449..c9415447b 100644
--- a/modules/image/image.module
+++ b/modules/image/image.module
@@ -972,7 +972,9 @@ function image_style_flush($style) {
// Delete the style directory in each registered wrapper.
$wrappers = file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE);
foreach ($wrappers as $wrapper => $wrapper_data) {
- file_unmanaged_delete_recursive($wrapper . '://styles/' . $style['name']);
+ if (file_exists($directory = $wrapper . '://styles/' . $style['name'])) {
+ file_unmanaged_delete_recursive($directory);
+ }
}
// Let other modules update as necessary on flush.