avoid COW violation
authorMichael Wallner <mike@php.net>
Mon, 30 Jan 2017 11:41:03 +0000 (12:41 +0100)
committerMichael Wallner <mike@php.net>
Mon, 30 Jan 2017 11:41:03 +0000 (12:41 +0100)
src/php_http_negotiate.h

index 44f1735..07e5564 100644 (file)
@@ -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(); \