#43958 [Opn->Fbk]: Misleading E_WARNING on failed include.
| From: | derick@php.net | Date: | Tue, 29 Jan 2008 07:35:29 +0000 |
| Subject: | #43958 [Opn->Fbk]: Misleading E_WARNING on failed include. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121703@lists.php.net to get a copy of this message | ||
ID: 43958
Updated by: derick@php.net
Reported By: sv4php at fmethod dot com
-Status: Open
+Status: Feedback
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Like due to namespaces... but that can only happen if you're running
PHP 5.3. Did you fill in the wrong version?
Previous Comments:
------------------------------------------------------------------------
[2008-01-29 03:24:04] sv4php at fmethod dot com
Description:
------------
IMPORTANT: DON'T MARK THIS BOGUS (like 43894) BEFORE READING
*CAREFULLY* THE DESCRIPTION AND EXPECTED RESULTS.
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('file-which-does-not-exist-on-purpose.php');
Expected result:
----------------
Warning: include(file-which-does-not-exist-on-purpose.php)
[function.include]: ...
Warning: include() [function.include]: ...
Actual result:
--------------
Warning: MyClass::include(file-which-does-not-exist-on-purpose.php)
[function.MyClass-include]: ...
Warning: MyClass::include() [function.include]: ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43958&edit=1