refactor the arr class to fix a few bugs.

This commit is contained in:
Taylor Otwell 2011-08-15 15:19:14 -05:00
parent de38744d78
commit 81a89604f9
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ public static function get($array, $key, $default = null)
*/ */
public static function set(&$array, $key, $value) public static function set(&$array, $key, $value)
{ {
if (is_null($key)) return $array = $value;
$keys = explode('.', $key); $keys = explode('.', $key);
while (count($keys) > 1) while (count($keys) > 1)