php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53260 Notice message when running file containing __halt_compiler() more than once
Submitted: 2010-11-08 02:06 UTC Modified: 2010-11-13 19:47 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: offshore at aopdg dot ru Assigned: felipe (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3.3 OS: Ubuntu
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: offshore at aopdg dot ru
New email:
PHP Version: OS:

 

 [2010-11-08 02:06 UTC] offshore at aopdg dot ru
Description:
------------
This is not the same with http://bugs.php.net/bug.php?id=39903 !
(Reported about fix, but problem is still here)

When running file containing __halt_compiler() second (third, etc) time, PHP displays a message saying:
PHP Notice:  Constant  already defined in .../b.php (see code)

Also notice that constant name is not shown.

Test script:
---------------
a.php:
<?php
echo __FILE__ . "\n";
include('./b.php');
include('./b.php');

b.php:
<?php
echo __FILE__ . "\n";
__halt_compiler();
data data data

Expected result:
----------------
/.../a.php 
/.../b.php
/.../b.php


Actual result:
--------------
/.../a.php
/.../b.php
PHP Notice:  Constant  already defined in /.../b.php on line 3
/.../b.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-08 02:10 UTC] offshore at aopdg dot ru
-Summary: Notice message when executing __halt_compiler() more than once in same file +Summary: Notice message when running file containing __halt_compiler() more than once
 [2010-11-08 02:10 UTC] offshore at aopdg dot ru
Summary updated
 [2010-11-13 18:34 UTC] felipe@php.net
The notice is expected, whereas you are including a same file.
But about the constant name not being displayed in the message, this will be fixed and other issue I've discovered.
 [2010-11-13 19:46 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=305327
Log: - Fixed bug #53305 (E_NOTICE when defining a constant starts with  __COMPILER_HALT_OFFSET__)
- Fixed a part of bug #53260 (the __COMPILER_HALT_OFFSET__ name is not shown in the E_NOTICE)
 [2010-11-13 19:47 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-11-13 19:47 UTC] felipe@php.net
I've fixed the issue related to __COMPILER_HALT_OFFSET__ is not being shown in the E_NOTICE message and other issue related on bug #53305

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 05:01:32 2024 UTC