Re: Re: fopen('.', 'r') succeedes !?
| From: | richard gray | Date: | Mon, 02 Mar 2015 20:05:16 +0000 |
| Subject: | Re: Re: fopen('.', 'r') succeedes !? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324572@lists.php.net to get a copy of this message | ||
On 02/03/2015 19:27, Umberto Salsi wrote:
salsi@icosaedro.it (Umberto Salsi) wrote:Discovered today: fopen() opens '.' [rest of my bogus comments removed]Filed https://bugs.php.net/bug.php?id=69163 about fopen() opening a directory under Linux, when a more reasonable behavior would be to raise E_WARNING. Testing for is_dir() is a weak workaroud nobody does and it is not atomic. you may want to fix the reproduce code on your bug report - you are opening a file (__FILE__) not a directory...!