#38324 [Opn->Bgs]: wrong error line number

From: Date: Fri, 04 Aug 2006 09:37:25 +0000
Subject: #38324 [Opn->Bgs]: wrong error line number
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100328@lists.php.net to get a copy of this message
 ID:               38324
 Updated by:       tony2001@php.net
 Reported By:      ftl_ at freemail dot hu
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Linux / Windows
 PHP Version:      5.1.4
 New Comment:

The engine tries to resolve UNDEFINED_CONSTANT in runtime, because it
can be defined in previously included files (which are included in
runtime too) or somewhere else.
So the behaviour is expected and the error message is correct.


Previous Comments:
------------------------------------------------------------------------

[2006-08-04 03:29:35] ftl_ at freemail dot hu

Description:
------------
wrong line number for "Use of undefined constant" notice.

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
class A {
  public $a = UNDEFINED_CONSTANT;
}
$obj = new A;
?>

Expected result:
----------------
Notice: Use of undefined constant UNDEFINED_CONSTANT - assumed
'UNDEFINED_CONSTANT' in [..]/test.php on line 4

Actual result:
--------------
Notice: Use of undefined constant UNDEFINED_CONSTANT - assumed
'UNDEFINED_CONSTANT' in [..]/test.php on line 6


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38324&edit=1


Thread (2 messages)

« previous php.bugs (#100328) next »