From: mccarthy36 at earthlink dot net
Operating system: Linux
PHP version: 4.3.4
PHP Bug Type: PHP options/info functions
Bug description: Misleading data returned by get_included_files
Description:
------------
I don't know if this is considered a bug, but in my opinion it's
undesirable behavior. I'm finding that if I try to include a file that
has a parse error, the file is not included -- the include function used
returns false -- but the "included" file name is in the array returned by
get_included_files().
Reproduce code:
---------------
(file 1)
<?php
$worked = "NO";
echo "*", include_once( 'included.php' ), "*";
echo "<pre>"; var_dump( get_included_files() ); echo "</pre>";
echo "#{$worked}#";
?>
(file 2)
<?php
$worked = "YES";
$name = "blah "whatever";
?>
Expected result:
----------------
Since there is a parse error in the "included" file, and include_once()
returns false, I expect the name of the "included" file not to appear in
the array returned by get_included_files().
Actual result:
--------------
include_once() returns false, yet the name of the "included" file is in
the array returned by get_included_files().
--
Edit bug report at http://bugs.php.net/?id=26814&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26814&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26814&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26814&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26814&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26814&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26814&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26814&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26814&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26814&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26814&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26814&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26814&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26814&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26814&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26814&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26814&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26814&r=float