#43894 [Opn->Bgs]: Misleading E_WARNING on failed include.
ID: 43894
Updated by: tony2001@php.net
Reported By: sv4php at fmethod dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2008-01-19 10:40:33] sv4php at fmethod dot com
Description:
------------
Run the snippet. It should produce two warnings. But the include
function is inexplicably prefixed with my class name.
Reproduce code:
---------------
class MyClass
{
static public function loadCode($p) {
return include $p;
}
}
MyClass::loadCode('I_DO_NOT_EXIST');
Expected result:
----------------
Warning: include(I_DO_NOT_EXIST) [function.include]: failed to open
stream: No such file or directory in ...
Warning: include() [function.include]: Failed opening 'I_DO_NOT_EXIST'
for inclusion (include_path='.;C:\php5\pear') in ...
Actual result:
--------------
Warning: MyClass::include(I_DO_NOT_EXIST) [function.MyClass-include]:
failed to open stream: No such file or directory in ...
Warning: MyClass::include() [function.include]: Failed opening
'I_DO_NOT_EXIST' for inclusion (include_path='.;C:\php5\pear') in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43894&edit=1
Thread (2 messages)