[php-src] Issue #10819: glob function have error when path have [] in it

From: Date: Thu, 09 Mar 2023 21:53:59 +0000
Subject: [php-src] Issue #10819: glob function have error when path have [] in it
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243883@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10819 Author: az-xx ### Description The following code: ```php <?php $path = 'folder [anything]'; if (file_exists($path) && is_dir($path)) { print_r(glob($path . "/*")); } else { echo "The specified path does not exist or is not a directory."; } ``` Resulted in this output: ``` Array ( ) ``` But I expected this output instead: ``` Array ( [0] => ''folder [anything/image.jpg' ) ``` ### PHP Version php 8.1 ### Operating System centios 7 & win 11

« previous php.bugs (#243883) next »