Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PHP 5.4 strict error fix

  • Loading branch information...
commit 173524ade2c0f35374bbe436835920705b78f0fe 1 parent 91c09d8
@dogmatic69 dogmatic69 authored
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.