Merge pull request #5123 from webbuilders-group/ImagickBackendFix

BUGFIX: Deleting images with ImagickBackend fails
This commit is contained in:
Damian Mooyman 2016-03-07 10:17:18 +13:00
commit f35786de0a

View File

@ -991,7 +991,9 @@ class Image extends File implements Flushable {
} }
protected function onBeforeDelete() { protected function onBeforeDelete() {
$backend = Injector::inst()->create(self::get_backend()); $backend = Injector::inst()->createWithArgs(self::config()->backend, array(
Director::baseFolder()."/" . $this->Filename
));
$backend->onBeforeDelete($this); $backend->onBeforeDelete($this);
$this->deleteFormattedImages(); $this->deleteFormattedImages();