X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_message.c;h=f391d5fd989019a71c962aa80b18dbb265fcfc43;hb=1f934bf6f8bf9343eac1fdc7fdba5959b8d062a1;hp=3fddf79701dc6a152d3647f84ac32d28fb957af3;hpb=49c4716aa5a97b2ae94491e74f5ff5c13c0ddee3;p=m6w6%2Fext-http diff --git a/php_http_message.c b/php_http_message.c index 3fddf79..f391d5f 100644 --- a/php_http_message.c +++ b/php_http_message.c @@ -859,15 +859,18 @@ static zval *php_http_message_object_read_prop(zval *object, zval *member, int t PHP_HTTP_MESSAGE_OBJECT_INIT(obj); + /* supplied retun_value lives on the stack of zend_read_property! */ + return_value = zend_get_std_object_handlers()->read_property(object, member, type, cache_slot, return_value); + if ((handler = php_http_message_object_get_prophandler(member_name))) { + zval_dtor(return_value); + if (type == BP_VAR_R) { handler->read(obj, return_value); } else { php_property_proxy_t *proxy = php_property_proxy_init(object, member_name); RETVAL_OBJ(&php_property_proxy_object_new_ex(php_property_proxy_get_class_entry(), proxy)->zo); } - } else { - zend_get_std_object_handlers()->read_property(object, member, type, cache_slot, return_value); } zend_string_release(member_name); @@ -1434,7 +1437,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(HttpMessage, setResponseStatus) { char *status; - int status_len; + size_t status_len; php_http_message_object_t *obj; php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &status, &status_len), invalid_arg, return);