From: Michael Wallner Date: Tue, 6 Sep 2005 12:01:42 +0000 (+0000) Subject: - only addref if we remember the stream X-Git-Tag: RELEASE_0_13_0~21 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d6e0e169d758495c0a9947a94b3963350acb6771;p=m6w6%2Fext-http - only addref if we remember the stream --- diff --git a/http_response_object.c b/http_response_object.c index 423b7b7..4f31e31 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -707,9 +707,8 @@ PHP_METHOD(HttpResponse, setStream) if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &the_stream)) { RETURN_FALSE; } - zend_list_addref(Z_LVAL_P(the_stream)); - php_stream_from_zval(the_real_stream, &the_stream); + php_stream_from_zval(the_real_stream, &the_stream); if (php_stream_stat(the_real_stream, &ssb)) { RETURN_FALSE; } @@ -718,7 +717,8 @@ PHP_METHOD(HttpResponse, setStream) (SUCCESS != UPD_STATIC_PROP(long, mode, SEND_RSRC))) { RETURN_FALSE; } - + zend_list_addref(Z_LVAL_P(the_stream)); + if (!(Z_LVAL_P(GET_STATIC_PROP(lastModified)) > 0)) { UPD_STATIC_PROP(long, lastModified, http_last_modified(the_real_stream, SEND_RSRC)); }