Skip to content
This repository
Browse code

PHP 5.4 strict error fix

  • Loading branch information...
commit 173524ade2c0f35374bbe436835920705b78f0fe 1 parent 91c09d8
Carl Sutton authored September 13, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  lib/Cake/Utility/ObjectCollection.php
6  lib/Cake/Utility/ObjectCollection.php
@@ -299,7 +299,8 @@ public function unload($name) {
299 299
  */
300 300
 	public function set($name = null, $object = null) {
301 301
 		if (!empty($name) && !empty($object)) {
302  
-			$this->_loaded[array_pop(pluginSplit($name))] = $object;
  302
+			list(, $name) = pluginSplit($name);
  303
+			$this->_loaded[$name] = $object;
303 304
 		}
304 305
 		return $this->_loaded;
305 306
 	}
@@ -319,7 +320,8 @@ public static function normalizeObjectArray($objects) {
319 320
 				$options = (array)$objectName;
320 321
 				$objectName = $i;
321 322
 			}
322  
-			$normal[array_pop(pluginSplit($objectName))] = array('class' => $objectName, 'settings' => $options);
  323
+			list(, $name) = pluginSplit($objectName);
  324
+			$normal[$name] = array('class' => $objectName, 'settings' => $options);
323 325
 		}
324 326
 		return $normal;
325 327
 	}

0 notes on commit 173524a

Please sign in to comment.
Something went wrong with that request. Please try again.