Skip to content

Commit

Permalink
Don't fail on empty path for zend_parse_arg_path
Browse files Browse the repository at this point in the history
  • Loading branch information
hikari-no-yume committed Dec 19, 2014
1 parent 60ec4f1 commit be78734
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Zend/zend_API.h
Expand Up @@ -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 {
Expand Down

0 comments on commit be78734

Please sign in to comment.