From: Michael Wallner Date: Sun, 5 Mar 2006 11:04:17 +0000 (+0000) Subject: - fix build (unknown macro) X-Git-Tag: RELEASE_1_0_0RC1~14 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fc720d489914964ae837d7acbcdf9dc74b5a0f29;p=m6w6%2Fext-http - fix build (unknown macro) - use exceptions where methods should return an object --- diff --git a/http_message_object.c b/http_message_object.c index c0f5bf0..3d2e727 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -1139,7 +1139,7 @@ PHP_METHOD(HttpMessage, getParentMessage) if (obj->message->parent) { RETVAL_OBJVAL(obj->parent, 1); } else { - http_error(HE_WARNING, HTTP_E_MESSAGE, "HttpMessage does not have a parent message"); + http_error(HE_WARNING, HTTP_E_RUNTIME, "HttpMessage does not have a parent message"); } } SET_EH_NORMAL(); diff --git a/http_request_object.c b/http_request_object.c index 6dc29b8..7791d4c 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -1877,13 +1877,11 @@ PHP_METHOD(HttpRequest, getResponseInfo) * to access the data of previously received responses within this request * cycle. * - * Throws HttpException. + * Throws HttpException, HttpRuntimeException. */ PHP_METHOD(HttpRequest, getResponseMessage) { - NO_ARGS; - - IF_RETVAL_USED { + NO_ARGS { zval *message; SET_EH_THROW_HTTP(); @@ -1891,7 +1889,7 @@ PHP_METHOD(HttpRequest, getResponseMessage) if (Z_TYPE_P(message) == IS_OBJECT) { RETVAL_OBJECT(message, 1); } else { - RETVAL_NULL(); + http_error(HE_WARNING, HTTP_E_RUNTIME, "HttpRequest does not contain a response message"); } SET_EH_NORMAL(); } @@ -1938,7 +1936,6 @@ PHP_METHOD(HttpRequest, getRequestMessage) * Get sent HTTP message. * * Returns an HttpMessage in a form of a string - * */ PHP_METHOD(HttpRequest, getRawRequestMessage) { @@ -1957,7 +1954,6 @@ PHP_METHOD(HttpRequest, getRawRequestMessage) * Get the entire HTTP response. * * Returns the complete web server response, including the headers in a form of a string. - * */ PHP_METHOD(HttpRequest, getRawResponseMessage) {