From bbc8a5d0d0f9c5f2eac8a26623ccb4d52de3f64c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Nov 2011 09:46:11 -0600 Subject: [PATCH] Tweak upload method in file class. --- laravel/file.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/laravel/file.php b/laravel/file.php index afd4bd2e..a12c72c6 100644 --- a/laravel/file.php +++ b/laravel/file.php @@ -108,14 +108,13 @@ public static function modified($path) * * @param string $key * @param string $path - * @param array $files * @return bool */ - public static function upload($key, $path, $files = null) + public static function upload($key, $path) { - if (is_null($files)) $files = $_FILES; + if ( ! isset($_FILES[$key])) return false; - return move_uploaded_file($files[$key]['tmp_name'], $path); + return move_uploaded_file($_FILES[$key]['tmp_name'], $path); } /**