fixing a few bugs in the form class.
This commit is contained in:
parent
531454a29b
commit
cb306c9091
|
@ -45,6 +45,8 @@ class Form {
|
|||
*/
|
||||
public static function open($action = null, $method = 'POST', $attributes = array(), $https = false)
|
||||
{
|
||||
$method = strtoupper($method);
|
||||
|
||||
$attributes['method'] = static::method($method);
|
||||
|
||||
$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)
|
||||
{
|
||||
return strtoupper(($method == 'PUT' or $method == 'DELETE') ? 'POST' : $method);
|
||||
return ($method !== 'GET') ? 'POST' : $method;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue