Basket: fix adding single objects

This commit is contained in:
Thomas Gelf 2018-11-25 22:05:25 +01:00
parent 7b6deea2fa
commit 264732ba98

View File

@ -136,7 +136,6 @@ class Basket extends DbObject implements ExportInterface
public function addObjects($type, $objects = true)
{
BasketSnapshot::assertValidType($type);
// '1' -> from Form!
if ($objects === 'ALL') {
$objects = true;
@ -150,8 +149,10 @@ class Basket extends DbObject implements ExportInterface
} else {
$this->chosenObjects[$type] = [];
}
if ($objects === '[]') {
$objects = [];
}
}
if ($objects === true) {
$this->chosenObjects[$type] = true;