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

Bug #5115 Visibility modifiers in method declaration throws parse error
Submitted: 2005-08-16 23:46 UTC
From: luis at m3 dot net Assigned: cellog
Status: Closed Package: PHP_Parser
PHP Version: 5.0.4 OS: Fedora Core 2
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 14 - 11 = ?

 
 [2005-08-16 23:46 UTC] luis at m3 dot net
Description: ------------ Parsing a method declaration containing visibility modifiers, such as public/private/protected, causes the parser to throw an error. Test script: --------------- <?php class myClass { private function _myMethod() { } } ?> Actual result: -------------- object(PEAR_Error) 'error_message_prefix' => '' 'mode' => 1 'level' => 1024 'code' => null 'message' => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 'userinfo' => null 'backtrace' => array 0 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PEAR.php' 'line' => 542 'function' => 'PEAR_Error' 'class' => 'PEAR_Error' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 1 => null 2 => 1 3 => 1024 4 => null 1 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PHP/Parser/Core.php' 'line' => 357 'function' => 'raiseError' 'class' => 'PHP_Parser_Core' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 2 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PHP/Parser/Core.php' 'line' => 518 'function' => 'raiseError' 'class' => 'PHP_Parser_Core' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 1 => array 0 => 'end-of-file' 1 => 'T_STATIC' 2 => 'T_ABSTRACT' 3 => 'T_FINAL' 4 => 'T_PRIVATE' 5 => 'T_PROTECTED' 6 => 'T_PUBLIC'

Comments

 [2007-02-21 05:58 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.