From: Michael Wallner Date: Mon, 30 Jan 2017 11:41:03 +0000 (+0100) Subject: avoid COW violation X-Git-Tag: RELEASE_3_2_0_RC1~60 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=6687800e97bf941bd1938a3ce749dd72834904ed avoid COW violation --- diff --git a/src/php_http_negotiate.h b/src/php_http_negotiate.h index 44f1735..07e5564 100644 --- a/src/php_http_negotiate.h +++ b/src/php_http_negotiate.h @@ -74,9 +74,10 @@ static inline HashTable *php_http_negotiate_content_type(HashTable *supported, p #define PHP_HTTP_DO_NEGOTIATE_DEFAULT(supported) \ { \ zval *value; \ + HashPosition pos; \ \ - zend_hash_internal_pointer_reset((supported)); \ - if ((value = zend_hash_get_current_data((supported)))) { \ + zend_hash_internal_pointer_reset_ex((supported), &pos); \ + if ((value = zend_hash_get_current_data_ex((supported), &pos))) { \ RETVAL_ZVAL(value, 1, 0); \ } else { \ RETVAL_NULL(); \