Fixed uploading images into Flex Object if field destination is not set

This commit is contained in:
Matias Griese
2021-05-12 10:36:25 +03:00
parent 40f08a7f8b
commit 5f66f2c4a9
2 changed files with 2 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
* Fixed markdown media operations not working when using `image://` stream [#3333](https://github.com/getgrav/grav/issues/3333) [#3349](https://github.com/getgrav/grav/issues/3349)
* Fixed copying page without changing the slug [getgrav/grav-plugin-admin#2135](https://github.com/getgrav/grav-plugin-admin/issues/2139)
* Fixed missing and commonly used methods when using `system.twig.undefined_functions = false` [getgrav/grav-plugin-admin#2138](https://github.com/getgrav/grav-plugin-admin/issues/2138)
* Fixed uploading images into Flex Object if field destination is not set
# v1.7.14
## 04/29/2021

View File

@@ -373,7 +373,7 @@ trait FlexMediaTrait
if (is_array($upload)) {
// Uses new format with [UploadedFileInterface, array].
$settings = $upload[1];
if ($settings['destination'] === $media->getPath()) {
if (isset($settings['destination']) && $settings['destination'] === $media->getPath()) {
$upload = $upload[0];
} else {
$upload = false;