refactor the arr class to fix a few bugs.
This commit is contained in:
parent
de38744d78
commit
81a89604f9
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue