From 86a5fd07396efacaeeff3dcd3f14e97f836f3ce2 Mon Sep 17 00:00:00 2001 From: kapv89 Date: Tue, 29 May 2012 14:04:06 +0530 Subject: [PATCH] Changed a line which causes "illegal string offset" error to be thrown in php5.4 on trying to access $value['tmp_name'] --- laravel/validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/validator.php b/laravel/validator.php index dd3a15fd..3290bc17 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -249,7 +249,7 @@ protected function validate_required($attribute, $value) { return false; } - elseif ( ! is_null(Input::file($attribute)) and $value['tmp_name'] == '') + elseif ( ! is_null(Input::file($attribute)) and is_array($value) and $value['tmp_name'] == '') { return false; }