Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.9.0

Bug #13417 Parser ignore class-method that are named as standard php functions
Submitted: 2008-03-17 19:39 UTC
From: farell Assigned: farell
Status: Closed Package: PHP_CompatInfo (version 1.7.0a1)
PHP Version: 5.2.5 OS:
Roadmaps: 1.7.0    
Subscription  


 [2008-03-17 19:39 UTC] farell (Laurent Laville)
Description: ------------ If you parse a file with a class and methods that have same name as standard php functions, these methods will be output in ignored_functions array. Example : take the HTML_CSS-1.5.1 package and HTML_CSS_Error Class (CSS/Error.php file) This class has a log public method (line 173+) what is also a php function [1] In SAPI mode, run test script below, and look at actual result Parser do not detect log as class method but as standard user function, and ignore it . Test script: --------------- <?php require_once 'PHP/CompatInfo.php'; $file = '/tmp/HTML_CSS-1.5.1/CSS/Error.php'; $info = new PHP_CompatInfo(); $r = $info->parseFile($file); var_export($r); ?> Expected result: ---------------- array ( 'ignored_functions' => array ( ), 'ignored_extensions' => array ( ), 'ignored_constants' => array ( ), 'max_version' => '', 'version' => '4.3.0', 'extensions' => array ( 0 => 'date', ), 'constants' => array ( ), 'tokens' => array ( ), ) Actual result: -------------- array ( 'ignored_functions' => array ( 0 => 'log', ), 'ignored_extensions' => array ( ), 'ignored_constants' => array ( ), 'max_version' => '', 'version' => '4.3.0', 'extensions' => array ( 0 => 'date', ), 'constants' => array ( ), 'tokens' => array ( ), )

Comments

 [2008-03-24 18:04 UTC] farell (Laurent Laville)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/PHP_CompatInfo