[BUGFIX] Only variables should be passed by reference 79/26779/3
authorXavier Perseguers <xavier@typo3.org>
Mon, 13 Jan 2014 09:59:24 +0000 (10:59 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 13 Jan 2014 21:00:19 +0000 (22:00 +0100)
array_shift() takes argument by reference.

Releases: 6.2
Fixes: #54933
Change-Id: I94c16bc739f36d669640701561ff94aebd63b1f5
Reviewed-on: https://review.typo3.org/26779
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Classes/Compatibility/LoadedExtensionsArray.php

index ea74bb1..937f9d1 100644 (file)
@@ -193,7 +193,8 @@ class LoadedExtensionsArray implements \Iterator, \ArrayAccess, \Serializable, \
         * @return void Any returned value is ignored.
         */
        public function rewind() {
-               $this->iteratorPosition = array_shift(array_keys($this->packageManager->getActivePackages()));
+               $keys = array_keys($this->packageManager->getActivePackages());
+               $this->iteratorPosition = array_shift($keys);
        }
 
        /**