- fix HttpMessage::setRequestMethod() errenously issuing a warning about an unknown...
authorMichael Wallner <mike@php.net>
Sat, 27 May 2006 10:33:18 +0000 (10:33 +0000)
committerMichael Wallner <mike@php.net>
Sat, 27 May 2006 10:33:18 +0000 (10:33 +0000)
http_message_object.c

index 9a62af44a171bfa18bc7f5eb1fe96fb5dc85f4f8..5e03e1e07c79ea2b751ae9ef9dfed5356400ed29 100644 (file)
@@ -1020,8 +1020,8 @@ PHP_METHOD(HttpMessage, setRequestMethod)
                http_error(HE_WARNING, HTTP_E_INVALID_PARAM, "Cannot set HttpMessage::requestMethod to an empty string");
                RETURN_FALSE;
        }
-       if (SUCCESS != http_check_method(method)) {
-               http_error_ex(HE_WARNING, HTTP_E_REQUEST_METHOD, "Unkown request method: %s", method);
+       if (!http_request_method_exists(1, 0, method)) {
+               http_error_ex(HE_WARNING, HTTP_E_REQUEST_METHOD, "Unknown request method: %s", method);
                RETURN_FALSE;
        }