Browse files

PHP 5.4 strict error fix

  • Loading branch information...
1 parent 91c09d8 commit 173524ade2c0f35374bbe436835920705b78f0fe @dogmatic69 dogmatic69 committed Sep 13, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Cake/Utility/ObjectCollection.php
View
6 lib/Cake/Utility/ObjectCollection.php
@@ -299,7 +299,8 @@ public function unload($name) {
*/
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 @@ public static function normalizeObjectArray($objects) {
$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;
}

0 comments on commit 173524a

Please sign in to comment.