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

View File

@@ -46,6 +46,8 @@ class Arr {
*/ */
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)