Doc #54715 [Opn->Dup]: Reporting error line about undefined constant
| From: | frozenfire@php.net | Date: | Sat, 02 Jul 2011 22:30:58 +0000 |
| Subject: | Doc #54715 [Opn->Dup]: Reporting error line about undefined constant | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6816@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54715&edit=1
ID: 54715
Updated by: frozenfire@php.net
Reported by: lgandras at gmail dot com
Summary: Reporting error line about undefined constant
-Status: Open
+Status: Duplicate
Type: Documentation Problem
Package: Scripting Engine problem
Operating System: CentOS 5.4
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
As you mention in your description, this bug is a duplicate of bug #38324.
Previous Comments:
------------------------------------------------------------------------
[2011-05-12 02:46:08] lgandras at gmail dot com
Description:
------------
Hi,
For me the following script should report the error line 4, not 7. It wasn't so
obvious to track down the issue.
I read this bug http://bugs.php.net/bug.php?id=38324, but class
constants may not
be defined in runtime.
Test script:
---------------
<?php
class A{
public $arr = array(self::UNDEFINED_CONST);
}
new A;
Expected result:
----------------
Fatal error: Undefined class constant 'self::UNDEFINED_CONST' in - on line 3
Actual result:
--------------
Fatal error: Undefined class constant 'self::UNDEFINED_CONST' in - on line 7
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54715&edit=1