Re: fopen('.', 'r') succeedes !?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



salsi@xxxxxxxxxxxx (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.

My error with fread() and the infinite loop was that EOF condition must be
tested with feof(); fread() returns FALSE only after an error.

Regards,
 ___ 
/_|_\  Umberto Salsi
\/_\/  www.icosaedro.it


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux