Made sure that getObjectIDs() returns an array after readObjects() has been called
authorMarcel Werk <burntime@woltlab.com>
Mon, 5 Mar 2018 11:31:54 +0000 (12:31 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 5 Mar 2018 11:31:54 +0000 (12:31 +0100)
wcfsetup/install/files/lib/data/DatabaseObjectList.class.php

index c562d0657aecff559783ad2fe56af42c41a66210..5d99f070624a9a28514b46f0dc82decef5d48819 100644 (file)
@@ -205,7 +205,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject {
                }
                
                // use table index as array index
-               $objects = [];
+               $objects = $this->indexToObject = [];
                foreach ($this->objects as $object) {
                        $objectID = $object->getObjectID();
                        $objects[$objectID] = $object;