]> granicus.if.org Git - php/commitdiff
Sync zpp in phar interceptors
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 14 Oct 2020 14:57:38 +0000 (16:57 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 14 Oct 2020 14:58:07 +0000 (16:58 +0200)
This should match the zpp of the intercepted functions...

ext/phar/func_interceptors.c

index f7cfe2249f77714309c05542373be900e1e21032..9987f79572ffd5dbb19a25023dcb02e34a18aab6 100644 (file)
@@ -36,7 +36,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */
                goto skip_phar;
        }
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|z", &filename, &filename_len, &zcontext) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|r!", &filename, &filename_len, &zcontext) == FAILURE) {
                RETURN_THROWS();
        }
 
@@ -347,7 +347,7 @@ PHAR_FUNC(phar_fopen) /* {{{ */
                /* no need to check, include_path not even specified in fopen/ no active phars */
                goto skip_phar;
        }
-       if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "ps|br", &filename, &filename_len, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) {
+       if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "ps|br!", &filename, &filename_len, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) {
                goto skip_phar;
        }
        if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) {