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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 12:01:24 2019 UTC