PHP 5.4 strict error fix

This commit is contained in:
dogmatic69 2012-09-13 21:12:04 +01:00
parent 91c09d87bc
commit 173524ade2

View file

@ -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;
}