php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44017 wrong error description with include/require in static method
Submitted: 2008-02-01 21:52 UTC Modified: 2008-02-01 22:56 UTC
From: admin at ifyouwantblood dot de Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at ifyouwantblood dot de
New email:
PHP Version: OS:

 

 [2008-02-01 21:52 UTC] admin at ifyouwantblood dot de
Description:
------------
include/require (_once) return wrong error messages when used inside a static method. the function name as well as the manual link are prefixed by the classname.

Reproduce code:
---------------
<?php

error_reporting(E_ALL|E_STRICT);

class test
{
	public static function inc()
	{
		require_once('i_do_not_exists.php');
	}
}

test::inc();

?>

Actual result:
--------------
Warning: test::require_once(i_do_not_exists.php) [function.test-require-once]: failed to open stream: No such file or directory

Fatal error: test::require_once() [function.require]: Failed opening required 'i_do_not_exists.php' (include_path='.;C:\php5\pear')

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-01 22:56 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 15:01:32 2024 UTC