@@ -2171,10 +2171,10 @@ ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string
21712171
21722172/* Inlined implementations shared by new and old parameter parsing APIs */
21732173
2174- typedef enum ZPP_PARSE_BOOL_STATUS {
2175- ZPP_PARSE_AS_FALSE = 0 ,
2176- ZPP_PARSE_AS_TRUE = 1 ,
2177- ZPP_PARSE_ERROR = 2 ,
2174+ typedef enum zpp_parse_bool_status {
2175+ ZPP_PARSE_BOOL_STATUS_FALSE = 0 ,
2176+ ZPP_PARSE_BOOL_STATUS_TRUE = 1 ,
2177+ ZPP_PARSE_BOOL_STATUS_ERROR = 2 ,
21782178} zpp_parse_bool_status ;
21792179
21802180ZEND_API bool ZEND_FASTCALL zend_parse_arg_class (zval * arg , zend_class_entry * * pce , uint32_t num , bool check_null );
@@ -2213,7 +2213,7 @@ static zend_always_inline bool zend_parse_arg_bool_ex(const zval *arg, bool *des
22132213 } else {
22142214 result = zend_parse_arg_bool_slow (arg , arg_num );
22152215 }
2216- if (UNEXPECTED (result == ZPP_PARSE_ERROR )) {
2216+ if (UNEXPECTED (result == ZPP_PARSE_BOOL_STATUS_ERROR )) {
22172217 return false;
22182218 }
22192219 * dest = result ;
@@ -2299,19 +2299,14 @@ static zend_always_inline bool zend_parse_arg_str_ex(zval *arg, zend_string **de
22992299 } else if (check_null && Z_TYPE_P (arg ) == IS_NULL ) {
23002300 * dest = NULL ;
23012301 } else {
2302- zend_string * str ;
23032302 if (frameless ) {
2304- str = zend_flf_parse_arg_str_slow (arg , arg_num );
2303+ * dest = zend_flf_parse_arg_str_slow (arg , arg_num );
23052304 } else {
2306- str = zend_parse_arg_str_slow (arg , arg_num );
2307- }
2308- if (str ) {
2309- * dest = str ;
2310- } else {
2311- return 0 ;
2305+ * dest = zend_parse_arg_str_slow (arg , arg_num );
23122306 }
2307+ return * dest != NULL ;
23132308 }
2314- return 1 ;
2309+ return true ;
23152310}
23162311
23172312static zend_always_inline bool zend_parse_arg_str (zval * arg , zend_string * * dest , bool check_null , uint32_t arg_num )
0 commit comments