diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 8209cce2dcaf8..bb63a23ce332c 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1203,10 +1203,12 @@ static zend_always_inline int zend_parse_arg_path(zval *arg, char **dest, size_t { zend_string *str; - if (!zend_parse_arg_path_str(arg, &str, check_null)) { + if (!zend_parse_arg_str(arg, &str, check_null) || + UNEXPECTED(CHECK_NULL_PATH(str->val, str->len))) { return 0; } - if (check_null && UNEXPECTED(!str)) { + + if (check_null && (UNEXPECTED(!str))) { *dest = NULL; *dest_len = 0; } else {