summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 1c1aafbdce..7de97ff336 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -774,6 +774,8 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
#define Z_PARAM_PROLOGUE(separate) \
++_i; \
+ ZEND_ASSERT(_i <= _min_num_args || _optional==1); \
+ ZEND_ASSERT(_i > _min_num_args || _optional==0); \
if (_optional) { \
if (UNEXPECTED(_i >_num_args)) break; \
} \
@@ -1011,6 +1013,8 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
zend_parse_arg_zval_deref(_arg, &dest, check_null); \
} else { \
++_i; \
+ ZEND_ASSERT(_i <= _min_num_args || _optional==1); \
+ ZEND_ASSERT(_i > _min_num_args || _optional==0); \
if (_optional && UNEXPECTED(_i >_num_args)) break; \
_real_arg++; \
zend_parse_arg_zval(_real_arg, &dest, check_null); \