Basket: fix adding single objects

This commit is contained in:
Thomas Gelf 2018-11-25 22:05:25 +01:00
parent 7b6deea2fa
commit 264732ba98
1 changed files with 3 additions and 2 deletions

View File

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