Skip to content

Commit 017c65c

Browse files
committed
Merge pull request laravel#1056 from Jakobud/bug/form/buttons/defaultValues
Fixed Exception thrown when passing null $value to Form::submit(), Form::reset(), Form::button()
2 parents 22962fc + 31c730c commit 017c65c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

laravel/form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ protected static function checkable($type, $name, $value, $checked, $attributes)
526526
* @param array $attributes
527527
* @return string
528528
*/
529-
public static function submit($value, $attributes = array())
529+
public static function submit($value = null, $attributes = array())
530530
{
531531
return static::input('submit', null, $value, $attributes);
532532
}
@@ -538,7 +538,7 @@ public static function submit($value, $attributes = array())
538538
* @param array $attributes
539539
* @return string
540540
*/
541-
public static function reset($value, $attributes = array())
541+
public static function reset($value = null, $attributes = array())
542542
{
543543
return static::input('reset', null, $value, $attributes);
544544
}
@@ -570,7 +570,7 @@ public static function image($url, $name = null, $attributes = array())
570570
* @param array $attributes
571571
* @return string
572572
*/
573-
public static function button($value, $attributes = array())
573+
public static function button($value = null, $attributes = array())
574574
{
575575
return '<button'.HTML::attributes($attributes).'>'.HTML::entities($value).'</button>';
576576
}

0 commit comments

Comments
 (0)