From 18e86b19915dec609896efdb4e969ab73d90cb5b Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 15 Jun 2005 13:44:12 +0000 Subject: [PATCH] - check responseMessage to be an object --- http_methods.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/http_methods.c b/http_methods.c index 94a4757..efc1cf7 100644 --- a/http_methods.c +++ b/http_methods.c @@ -2069,7 +2069,11 @@ PHP_METHOD(HttpRequest, getResponseMessage) getObject(http_request_object, obj); message = GET_PROP(obj, responseMessage); - RETVAL_OBJECT(message); + if (Z_TYPE_P(message) == IS_OBJECT) { + RETVAL_OBJECT(message); + } else { + RETURN_NULL(); + } } } /* }}} */ -- 2.30.2