Basket::setObjects: Reset $chosenObjects property only if the given objects is empty (#2902)

This commit is contained in:
Eric Lippmann 2024-11-07 11:21:15 +01:00 committed by GitHub
commit 39c823c655
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,7 +82,6 @@ class Basket extends DbObject implements ExportInterface
if (empty($objects)) {
$this->chosenObjects = [];
} else {
$this->chosenObjects = [];
foreach ((array) $objects as $type => $object) {
$this->addObjects($type, $object);
}