reinitilaize http message prior throwing error
authorMichael Wallner <mike@php.net>
Wed, 24 Sep 2008 11:30:39 +0000 (11:30 +0000)
committerMichael Wallner <mike@php.net>
Wed, 24 Sep 2008 11:30:39 +0000 (11:30 +0000)
http_message_object.c

index b6b3aaf..d01c256 100644 (file)
@@ -1396,8 +1396,8 @@ PHP_METHOD(HttpMessage, unserialize)
                if ((msg = http_message_parse_ex(obj->message, serialized, (size_t) length))) {
                        obj->message = msg;
                } else {
-                       http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
                        http_message_init(obj->message);
+                       http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
                }
        }
 }