diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index f1b2b0eba1e6..9d83f740d501 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -932,6 +932,7 @@ void phar_intercept_functions_shutdown(void) PHAR_RELEASE(fopen); PHAR_RELEASE(file_get_contents); PHAR_RELEASE(is_file); + PHAR_RELEASE(is_link); PHAR_RELEASE(is_dir); PHAR_RELEASE(opendir); PHAR_RELEASE(file_exists); diff --git a/ext/phar/tests/phar-is-link-intercept.phpt b/ext/phar/tests/phar-is-link-intercept.phpt new file mode 100644 index 000000000000..f81f1ae425d7 --- /dev/null +++ b/ext/phar/tests/phar-is-link-intercept.phpt @@ -0,0 +1,29 @@ +--TEST-- +phar: is_link() intercept correctly delegates for non-symlink phar entries +--EXTENSIONS-- +phar +--INI-- +phar.readonly=0 +phar.require_hash=0 +--FILE-- +addFromString('file.txt', 'hello'); +$phar->setStub(''); +include $fname; +?> +--CLEAN-- + +--EXPECT-- +regular entry (not a symlink): bool(false) +missing entry: bool(false) +absolute phar:// path (bypasses intercept): bool(false)