fixed arr::get argument order.

This commit is contained in:
Taylor Otwell 2011-06-16 22:27:57 -05:00
parent d802ae8386
commit 73d8e2f2fa
2 changed files with 5 additions and 5 deletions

View File

@ -5,12 +5,12 @@ class Arr {
/** /**
* Get an item from an array. * Get an item from an array.
* *
* @param string $key
* @param string $default
* @param array $array * @param array $array
* @param string $key
* @param array $default
* @return mixed * @return mixed
*/ */
public static function get($key, $default = null, $array = array()) public static function get($array, $key, $default = null)
{ {
if (is_null($key)) if (is_null($key))
{ {

View File

@ -41,7 +41,7 @@ public static function get($key = null, $default = null)
static::hydrate(); static::hydrate();
} }
return Arr::get($key, $default, static::$input); return Arr::get(static::$input, $key, $default);
} }
/** /**
@ -77,7 +77,7 @@ public static function old($key = null, $default = null)
throw new \Exception("Sessions must be enabled to retrieve old input data."); throw new \Exception("Sessions must be enabled to retrieve old input data.");
} }
return Arr::get($key, $default, Session::get('laravel_old_input', array())); return Arr::get(Session::get('laravel_old_input', array()), $key, $default);
} }
/** /**