diff --git a/CHANGELOG.md b/CHANGELOG.md index 20296fb7..5f281e5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Show the clear cache buttons if the user has `admin.cache` permissions [#908](https://github.com/getgrav/grav-plugin-admin/issues/908#issuecomment-270748616) * Fix colorpicker validation when transparency is set to 1.00 [#921](https://github.com/getgrav/grav-plugin-admin/issues/921) * Fix html markup in section twig [#922](https://github.com/getgrav/grav-plugin-admin/pull/922) + * Fix bug in deleting a file uploaded with the `file` field [#920](github.com/getgrav/grav-plugin-admin/issues/920) # v1.2.7 ## 12/22/2016 diff --git a/classes/adminbasecontroller.php b/classes/adminbasecontroller.php index 0bf63a6b..4106366d 100644 --- a/classes/adminbasecontroller.php +++ b/classes/adminbasecontroller.php @@ -806,7 +806,7 @@ class AdminBaseController $field = $uri->param('field'); $event = $this->grav->fireEvent('onAdminCanSave', new Event(['controller' => &$this])); - if (!$event['can_save']) { + if (isset($event['can_save']) && $event['can_save'] == false) { return false; }