Bug #81336 [Fbk->Opn]: & in filename doesn't read file with file

From: Date: Fri, 06 Aug 2021 12:10:35 +0000
Subject: Bug #81336 [Fbk->Opn]: & in filename doesn't read file with file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235644@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81336&edit=1 ID: 81336 Updated by: cmb@php.net Reported by: remco dot pc at outlook dot com Summary: & in filename doesn't read file with file -Status: Feedback +Status: Open Type: Bug Package: Filesystem function related Operating System: win10 - wsl ubuntu-200.4 LTS PHP Version: 8.0.9 -Assigned To: cmb +Assigned To: Block user comment: N Private report: N New Comment: I checked with & not @. Without further info, I can't help. Sorry. Previous Comments: ------------------------------------------------------------------------ [2021-08-06 11:57:39] remco dot pc at outlook dot com i did a mistake, php version 8.0.8. @ sign in file name is ok and reading. & sign is not reading the file. i don't get any error messages reading the file. ------------------------------------------------------------------------ [2021-08-06 11:43:58] cmb@php.net I cannot reproduce with PHP-8.0 on WSL running Debian 9.13 on Windows 10 either; neither with the file on the host nor in the guest. Do you get any warning or notice (I assume you have error_reporting=-1)? Can you provide further info which may help to make the issue reproducible? ------------------------------------------------------------------------ [2021-08-06 11:06:36] remco dot pc at outlook dot com os, win10 - wsl ubuntu-200.4 LTS ------------------------------------------------------------------------ [2021-08-06 10:57:29] cmb@php.net I cannot reproduce this on Windows with PHP-7.4. Either it is PHP 8 specific, or it doesn't affect Windows. Please tell us which OS you are using. ------------------------------------------------------------------------ [2021-08-06 10:49:17] remco dot pc at outlook dot com Description: ------------ when a filename has an ampersand in it (&) the file exist is true, but file read with file() or file_get_contents doesn't read the file Test script: --------------- $read = file('test&.mp3'); dd($read); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81336&edit=1

« previous php.bugs (#235644) next »