]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/lists/class_BaseList.php
Use array_push() instead of [] as array_push() checks if parameter 1 is really an...
[hub.git] / application / hub / main / lists / class_BaseList.php
index c4d18376846e9e10567102343be1795440c73a0a..3add9145878e16edbc819b2b8338ad668e6a45c7 100644 (file)
@@ -136,7 +136,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                $this->listGroups[$groupName]->addEntry($subGroup, $hash);
 
                // Add the hash to the index
-               $this->listIndex[] = $hash;
+               array_push($this->listIndex, $hash);
 
                // Add the instance itself to the list
                $this->listEntries[$hash] = $instance;
@@ -172,7 +172,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                        // Is the list entry set?
                        if ($this->isHashValid($hash)) {
                                // Add it
-                               $array[] = $this->listEntries[$hash];
+                               array_push($array, $this->listEntries[$hash]);
                                //* DEBUG: */ print __METHOD__.": ADDED!\n";
                        } // END - if
                } // END - foreach
@@ -202,7 +202,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:  groupName=' . $groupName . ', entry=' . $entry . ', hash=' . $hash);
 
                // Add the hash to the index
-               $this->listIndex[] = $hash;
+               array_push($this->listIndex, $hash);
                //* DEBUG: */ print $groupName.'/'.$this->count().chr(10);
 
                // Now add the entry to the list