From: Dmitry Stogov Date: Wed, 17 Jan 2018 11:57:42 +0000 (+0300) Subject: Resource is not copyable (just refcounted) X-Git-Tag: php-7.3.0alpha1~597 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb6e574b29e1e6529245d1966de285b318007805;p=php Resource is not copyable (just refcounted) --- diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index b87c523273..01bc6e4021 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -180,7 +180,7 @@ php_stream_filter_status_t userfilter_filter( /* Give the userfilter class a hook back to the stream */ php_stream_to_zval(stream, &tmp); - zval_copy_ctor(&tmp); + Z_ADDREF(tmp); add_property_zval(obj, "stream", &tmp); /* add_property_zval increments the refcount which is unwanted here */ zval_ptr_dtor(&tmp);