From cb306c9091eb0f346703473ad3d5a297a5fa8592 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 1 Dec 2011 23:34:31 -0600 Subject: [PATCH] fixing a few bugs in the form class. --- laravel/form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/form.php b/laravel/form.php index 34b1446c..df2b06d4 100644 --- a/laravel/form.php +++ b/laravel/form.php @@ -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; } /**