@@ -1601,6 +1601,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
1601
1601
#define Z_PARAM_PATH (dest , dest_len ) \
1602
1602
Z_PARAM_PATH_EX(dest, dest_len, 0, 0)
1603
1603
1604
+ #define Z_PARAM_PATH_OR_NULL (dest , dest_len ) \
1605
+ Z_PARAM_PATH_EX(dest, dest_len, 1, 0)
1606
+
1604
1607
/* old "P" */
1605
1608
#define Z_PARAM_PATH_STR_EX2 (dest , check_null , deref , separate ) \
1606
1609
Z_PARAM_PROLOGUE(deref, separate); \
@@ -1681,6 +1684,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
1681
1684
#define Z_PARAM_ZVAL (dest ) \
1682
1685
Z_PARAM_ZVAL_EX(dest, 0, 0)
1683
1686
1687
+ #define Z_PARAM_ZVAL_OR_NULL (dest ) \
1688
+ Z_PARAM_ZVAL_EX(dest, 1, 0)
1689
+
1684
1690
/* old "+" and "*" */
1685
1691
#define Z_PARAM_VARIADIC_EX (spec , dest , dest_num , post_varargs ) do { \
1686
1692
uint32_t _num_varargs = _num_args - _i - (post_varargs); \
@@ -2007,7 +2013,8 @@ static zend_always_inline int zend_parse_arg_str_or_obj(
2007
2013
) {
2008
2014
if (EXPECTED (Z_TYPE_P (arg ) == IS_OBJECT )) {
2009
2015
if (base_ce && UNEXPECTED (!instanceof_function (Z_OBJCE_P (arg ), base_ce ))) {
2010
- return 0 ;
2016
+ * destination_object = NULL ;
2017
+ return zend_parse_arg_str_slow (arg , destination_string );
2011
2018
}
2012
2019
2013
2020
* destination_string = NULL ;
0 commit comments