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: <input type='submit'/> <input type='reset'/> <button></button>
Signed-off-by: Jakobud <jake.e.wilson@gmail.com>
This commit is contained in:
parent
bc34498a7c
commit
31c730c913
|
@ -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 '<button'.HTML::attributes($attributes).'>'.HTML::entities($value).'</button>';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue