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

Bug #19394 Notice in NonExecutableCodeSniff
Submitted: 2012-04-21 22:00 UTC
From: aik099 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.3)
PHP Version: 5.3.9 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-04-21 22:00 UTC] aik099 (Alexander Obuhovich)
Description: ------------ I'm getting very much errors, when trying to apply "Sonar Way" profile for "Code Sniffer": 18:51:42.744 INFO .u.c.CommandExecutor - Notice: Undefined index: scope_closer in /usr/local/lib/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/PH P/NonExecutableCodeSniff.php on line 209 18:51:42.745 INFO .u.c.CommandExecutor - PHP Notice: Undefined index: scope_closer in /usr/local/lib/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/PH P/NonExecutableCodeSniff.php on line 209 Obviously that "scope_cleaner" key should be present after scanned php file is tokenized, but it's not present.

Comments

 [2012-04-21 22:04 UTC] aik099 (Alexander Obuhovich)
I was trying to analyze In-Portal CMS opensource project code at http://source.in-portal.org/in-portal/branches/5.2.x/ location.
 [2012-04-23 09:35 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Turned out to be a problem with conditional exit statements, like: defined('FOO') or die('error'); Fixed in git repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/21bb0eab5083c54ab12bb61ae 8a4fb5aa0e8e4fc