fixing a few bugs in the form class.

This commit is contained in:
Taylor Otwell 2011-12-01 23:34:31 -06:00
parent 531454a29b
commit cb306c9091
1 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,8 @@ class Form {
*/ */
public static function open($action = null, $method = 'POST', $attributes = array(), $https = false) public static function open($action = null, $method = 'POST', $attributes = array(), $https = false)
{ {
$method = strtoupper($method);
$attributes['method'] = static::method($method); $attributes['method'] = static::method($method);
$attributes['action'] = static::action($action, $https); $attributes['action'] = static::action($action, $https);
@ -75,7 +77,7 @@ public static function open($action = null, $method = 'POST', $attributes = arra
*/ */
protected static function method($method) protected static function method($method)
{ {
return strtoupper(($method == 'PUT' or $method == 'DELETE') ? 'POST' : $method); return ($method !== 'GET') ? 'POST' : $method;
} }
/** /**