diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 84473e6e..08ba3ba8 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -12,6 +12,7 @@ before switching to a new version. ### User Interface * FIX: restoring a basket fails when there is only one configured DB (#1716) +* FIX: creating a new Basket with a "Custom Selection" failed with an error (#1733) 1.6.0 diff --git a/library/Director/DirectorObject/Automation/Basket.php b/library/Director/DirectorObject/Automation/Basket.php index f1991327..d78e1640 100644 --- a/library/Director/DirectorObject/Automation/Basket.php +++ b/library/Director/DirectorObject/Automation/Basket.php @@ -145,7 +145,7 @@ class Basket extends DbObject implements ExportInterface } elseif ($objects === null || $objects === 'IGNORE') { return; } elseif ($objects === '[]' || is_array($objects)) { - if (! is_array($this->chosenObjects[$type])) { + if (! isset($this->chosenObjects[$type]) || ! is_array($this->chosenObjects[$type])) { $this->chosenObjects[$type] = []; } if (isset($this->protectedFormerChosenObjects[$type])) {