]> granicus.if.org Git - php/commitdiff
Fixed expectation
authorDmitry Stogov <dmitry@zend.com>
Mon, 17 Dec 2018 12:59:16 +0000 (15:59 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 17 Dec 2018 12:59:16 +0000 (15:59 +0300)
Zend/zend_API.h

index a8c04658d8681c844c0851cac80b664869c1aa11..989868a1919f6a8f374798ec059d113553d4a72c 100644 (file)
@@ -794,7 +794,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
        _real_arg++; \
        _arg = _real_arg; \
        if (deref) { \
-               ZVAL_DEREF(_arg); \
+               if (EXPECTED(Z_ISREF_P(_arg))) { \
+                       _arg = Z_REFVAL_P(_arg); \
+               } \
        } \
        if (separate) { \
                SEPARATE_ZVAL_NOREF(_arg); \