ID:          32924
 Updated by:  [EMAIL PROTECTED]
 Reported By: stas at zend dot com
 Status:      Closed
 Bug Type:    *General Issues
 PHP Version: 5.0.4
 Assigned To: stas
 New Comment:

Fixed for 5HEAD.


Previous Comments:
------------------------------------------------------------------------

[2005-05-04 18:17:45] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2005-05-03 11:35:17] stas at zend dot com

Description:
------------
At least starting from 4.3.x, when file is included via include(), it
is added to the list of included files, so that the code:
<? include('foo'); include_once('foo'); ?>
woould include 'foo' only once.

However, if you put foo in auto_prepend_file and then do <?
include_once('foo'); ?> - 'foo' would be included twice.

I see this behaviour as inconsistent and needing to be fixed, though
there can be some BC issues with that. 

Reproduce code:
---------------
1. 
<? include('foo'); include_once('foo'); ?>
foo:
<? echo "Whatever..."; ?>

2.
auto_prepend_file=foo
<? include_once('foo'); ?>

Expected result:
----------------
"Whatever..." once in both cases

Actual result:
--------------
"Whatever..."  once in the first case, twice in the second.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32924&edit=1

Reply via email to