Merge pull request #1056 from Jakobud/bug/form/buttons/defaultValues

Fixed Exception thrown when passing null $value to Form::submit(), Form::reset(), Form::button()
This commit is contained in:
Taylor Otwell 2012-09-01 17:35:34 -07:00
commit 017c65c0bc
1 changed files with 3 additions and 3 deletions

View File

@ -526,7 +526,7 @@ protected static function checkable($type, $name, $value, $checked, $attributes)
* @param array $attributes * @param array $attributes
* @return string * @return string
*/ */
public static function submit($value, $attributes = array()) public static function submit($value = null, $attributes = array())
{ {
return static::input('submit', null, $value, $attributes); return static::input('submit', null, $value, $attributes);
} }
@ -538,7 +538,7 @@ public static function submit($value, $attributes = array())
* @param array $attributes * @param array $attributes
* @return string * @return string
*/ */
public static function reset($value, $attributes = array()) public static function reset($value = null, $attributes = array())
{ {
return static::input('reset', null, $value, $attributes); return static::input('reset', null, $value, $attributes);
} }
@ -570,7 +570,7 @@ public static function image($url, $name = null, $attributes = array())
* @param array $attributes * @param array $attributes
* @return string * @return string
*/ */
public static function button($value, $attributes = array()) public static function button($value = null, $attributes = array())
{ {
return '<button'.HTML::attributes($attributes).'>'.HTML::entities($value).'</button>'; return '<button'.HTML::attributes($attributes).'>'.HTML::entities($value).'</button>';
} }