From 173524ade2c0f35374bbe436835920705b78f0fe Mon Sep 17 00:00:00 2001 From: dogmatic69 Date: Thu, 13 Sep 2012 21:12:04 +0100 Subject: [PATCH] PHP 5.4 strict error fix --- lib/Cake/Utility/ObjectCollection.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index 300f65095..9c76b5b9e 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -299,7 +299,8 @@ abstract class ObjectCollection { */ public function set($name = null, $object = null) { if (!empty($name) && !empty($object)) { - $this->_loaded[array_pop(pluginSplit($name))] = $object; + list(, $name) = pluginSplit($name); + $this->_loaded[$name] = $object; } return $this->_loaded; } @@ -319,7 +320,8 @@ abstract class ObjectCollection { $options = (array)$objectName; $objectName = $i; } - $normal[array_pop(pluginSplit($objectName))] = array('class' => $objectName, 'settings' => $options); + list(, $name) = pluginSplit($objectName); + $normal[$name] = array('class' => $objectName, 'settings' => $options); } return $normal; }