- check responseMessage to be an object
authorMichael Wallner <mike@php.net>
Wed, 15 Jun 2005 13:44:12 +0000 (13:44 +0000)
committerMichael Wallner <mike@php.net>
Wed, 15 Jun 2005 13:44:12 +0000 (13:44 +0000)
http_methods.c

index 94a47573f3e69c164cb2fd85077649727eb7c77e..efc1cf73469d7515f6e6a2d5273cff3f15791e44 100644 (file)
@@ -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();
+               }
        }
 }
 /* }}} */