From 31c730c9138fc4ead3b1644dbafc416e9ea77d9a Mon Sep 17 00:00:00 2001 From: Jakobud Date: Fri, 3 Aug 2012 10:47:34 -0600 Subject: [PATCH] Passing a null $value to Form::submit(), Form::reset() or Form::button() was throwing an Exception. I made the default $value = null for those methods. They result in the following respective valid HTML: Signed-off-by: Jakobud --- laravel/form.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel/form.php b/laravel/form.php index 5fa6d129..e7855a1d 100644 --- a/laravel/form.php +++ b/laravel/form.php @@ -526,7 +526,7 @@ protected static function checkable($type, $name, $value, $checked, $attributes) * @param array $attributes * @return string */ - public static function submit($value, $attributes = array()) + public static function submit($value = null, $attributes = array()) { return static::input('submit', null, $value, $attributes); } @@ -538,7 +538,7 @@ public static function submit($value, $attributes = array()) * @param array $attributes * @return string */ - public static function reset($value, $attributes = array()) + public static function reset($value = null, $attributes = array()) { return static::input('reset', null, $value, $attributes); } @@ -570,7 +570,7 @@ public static function image($url, $name = null, $attributes = array()) * @param array $attributes * @return string */ - public static function button($value, $attributes = array()) + public static function button($value = null, $attributes = array()) { return ''.HTML::entities($value).''; }