php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34652 feof(FALSE); returns FALSE
Submitted: 2005-09-27 07:00 UTC Modified: 2008-08-17 09:38 UTC
From: karoly at negyesi dot net Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: Irrevelant OS: Kubuntu Linux
Private report: No CVE-ID: None
 [2005-09-27 07:00 UTC] karoly at negyesi dot net
Description:
------------
feof does not report TRUE when fopen failed thus any script that expects this will fail into an infinite loop. This has been reported before but that report is closed.

Reproduce code:
---------------
php -r "var_dump(feof(FALSE));"


Expected result:
----------------
bool(true)

Actual result:
--------------
Warning: feof(): supplied argument is not a valid stream resource in Command line code on line 1
bool(false)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-27 14:25 UTC] marcot@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Works just fine on my 4_4 from CVS.
 [2005-10-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-04-11 20:51 UTC] karoly at negyesi dot net
The problem exists even with 5.1.2 .
 [2006-04-11 20:56 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2008-08-17 08:51 UTC] karoly at negyesi dot net
I did check how to report a bug report and I provided reproduce code and expected and actual result. What's missing?
 [2008-08-17 09:38 UTC] lbarnaud@php.net
This is not considered to be a bug.

Even if your change request appear to be a good idea, some
applications may rely on this behavior and changing that may break
them.

Instead you may check your stream resources after opening them and/or
before calling feof().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 23:01:32 2024 UTC