Skip to content
Snippets Groups Projects
Commit 00f461ae authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2079315 by mondrake: Fixed Image style editing leads to redundant watchdog entries.

parent e0b1f83e
No related branches found
No related tags found
No related merge requests found
......@@ -255,7 +255,9 @@ public function flush($path = NULL) {
// 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/' . $this->id());
if (file_exists($directory = $wrapper . '://styles/' . $this->id())) {
file_unmanaged_delete_recursive($directory);
}
}
// Let other modules update as necessary on flush.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment