php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34202 Invalid error line number
Submitted: 2005-08-21 08:31 UTC Modified: 2005-08-21 12:24 UTC
From: stochnagara at hotmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.0RC1 OS: windows xp
Private report: No CVE-ID: None
 [2005-08-21 08:31 UTC] stochnagara at hotmail dot com
Description:
------------
Incorrect implementations of interface functions are shown as fatal errors as expected but a wrong line number is given. The error shows the line where the declaration of the class begins instead of the line where the function is incorrectly implemented.

Reproduce code:
---------------
<? //line 1
class foo implements ArrayAccess { //line 2
	function offsetSet() {} //line 3
} //line 4
?>


Expected result:
----------------
Fatal error: Declaration of foo::offsetSet() must be compatible with that of ArrayAccess::offsetSet() in ...\index.php on line 3

Actual result:
--------------
Fatal error: Declaration of foo::offsetSet() must be compatible with that of ArrayAccess::offsetSet() in ...\index.php on line 2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-21 12:24 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 22 20:00:03 2025 UTC