php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64596 Parsekit should ignore scope of host file
Submitted: 2013-04-06 03:53 UTC Modified: 2017-04-01 21:16 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: krinklemail at gmail dot com Assigned:
Status: Wont fix Package: parsekit (PECL)
PHP Version: 5.4.13 OS: Mac OS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: krinklemail at gmail dot com
New email:
PHP Version: OS:

 

 [2013-04-06 03:53 UTC] krinklemail at gmail dot com
Description:
------------
When using parsekit_compile_file from a file that contains an equally named 
function as the file it is parsing, it will include an error:
"Cannot redeclare example() (previously declared in lint.php:2)"

Parsekit should ignore the scope of the host file.

Test script:
---------------
<?php
$errors = array();
$oparray = parsekit_compile_file($_SERVER['PHP_SELF'], $errors, PARSEKIT_SIMPLE);

var_dump($oparray, $errors);

function example() {}


Expected result:
----------------
It should encounter 0 errors.

Actual result:
--------------
It encounters an error for every function in the compiled file that has the same 
name as the file parsekit_compile_file is called from.

It doesn't have to be the same file (though that's the easiest way to test it).


Cannot redeclare example() (previously declared in /tmp/pecl-php-
parsekit/examples/compile_file.php:8)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 21:16 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 21:16 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2009, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC