X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_request_object.c;h=7791d4c1c1fdf49bd532654b286b0a9d07d1653e;hb=30f23d359aff10b458f036226a8e10bceb0a2da9;hp=6dc29b8cf5175de8268b8592da71a2c991ca1367;hpb=efd602160cd419f39504f5f58df0d2890a607206;p=m6w6%2Fext-http 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) {