From dc01b3c26e39696f344d1f2dc04aa6b3923f4f8e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 26 Jun 2011 09:10:11 -0500 Subject: [PATCH] added default value to Input::file and defaulted Validator::make. --- system/input.php | 2 +- system/validator.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/input.php b/system/input.php index b09ef673..ffcc911c 100644 --- a/system/input.php +++ b/system/input.php @@ -76,7 +76,7 @@ class Input { * @param mixed $default * @return array */ - public static function file($key, $default = null) + public static function file($key = null, $default = null) { return Arr::get($_FILES, $key, $default); } diff --git a/system/validator.php b/system/validator.php index c7e9a2bf..cfb2a7f4 100644 --- a/system/validator.php +++ b/system/validator.php @@ -29,7 +29,7 @@ class Validator { * @param mixed $target * @return void */ - public function __construct($target) + public function __construct($target = array()) { // --------------------------------------------------------- // If the source is an Eloquent model, use the model's @@ -44,7 +44,7 @@ class Validator { * @param mixed $target * @return Validator */ - public static function of($target) + public static function make($target = array()) { return new static($target); }