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