Skip to content

Commit

Permalink
PHP 5.4 strict error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Sep 13, 2012
1 parent 91c09d8 commit 173524a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Cake/Utility/ObjectCollection.php
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 173524a

Please sign in to comment.