FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17096&edit=1

ID: 17096
Updated by: gsherwood@squiz.net
Reported By: kelfe at gmx dot de
Summary: Notice: Undefined index: scope_condition in
ScopeClosingBraceSniff.php
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Linux
Package Version: 1.2.2
PHP Version: 5.2.5
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
This bug has been fixed in SVN.

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.




Previous Comments:
------------------------------------------------------------------------

[2010-02-13 16:38:18] elfe

Description:
------------
Codesniffer (phpcs) produces a notice when encountering the attached
code
related to bug 17013

Test script:
---------------
<?php
switch($i) {
case 1: {}
}
?>

Expected result:
----------------
no notice would be expected


Actual result:
--------------
Notice: Undefined index: scope_condition in
/usr/share/php/PHP/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php
on line 72

Call Stack:
0.0007 96336 1. {main}() /usr/bin/phpcs:0
0.0170 1604080 2. PHP_CodeSniffer_CLI->process($values = ???)
/usr/bin/phpcs:30
0.0180 1611544 3. PHP_CodeSniffer->process($files = array (0
=> '/bugged.php'), $standard = 'PEAR', $sniffs = array (), $local =
FALSE) /usr/share/php/PHP/CodeSniffer/CLI.php:423
0.0675 3778200 4. PHP_CodeSniffer->processFile($file =
'/bugged.php', $contents = ???) /usr/share/php/PHP/CodeSniffer.php:376
0.0677 3779120 5. PHP_CodeSniffer->_processFile($file =
'/bugged.php', $contents = NULL) /usr/share/php/PHP/CodeSniffer.php:815
0.0678 3781512 6. PHP_CodeSniffer_File->start($contents =
NULL) /usr/share/php/PHP/CodeSniffer.php:900
0.0769 3961288 7.
PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff->process($phpcsFile =
class PHP_CodeSniffer_File { private $_file = '/bugged.php'; public
$eolChar = '\n'; public $tokenizer = class
PHP_CodeSniffer_Tokenizers_PHP { ... }; public $tokenizerType = 'PHP';
public $numTokens = 21; private $_tokens = array (...); private $_errors
= array (...); private $_warnings = array (...); private $_ignoredLines
= array (...); private $_errorCount = 1; private $_warningCount = 0;
private $_listeners = array (...); private $_activeListener =
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff'; protected $tokenizers =
array (...) }, $stackPtr = 9)
/usr/share/php/PHP/CodeSniffer/File.php:431

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 15, '10 at 3:14a
activeFeb 15, '10 at 3:14a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2021 Grokbase