Basket: do not fail when setting "Custom Selection"

fixes #1733
This commit is contained in:
Thomas Gelf 2018-12-12 10:42:31 +01:00
parent 788fb452cd
commit 35318396e8
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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])) {