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

ID: 16140
Updated by: gsherwood@squiz.net
Reported By: bate at php dot net
Summary: $stackPtr is not a class member var
-Status: Open
+Status: Duplicate
Type: Bug
Package: PHP_CodeSniffer
Package Version: 1.2.0RC1
PHP Version: 5.2.9
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: squiz

This is the same issue as bug #16071 - I have move the reproduce code
over to it.


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

[2009-04-22 13:31:53] bate

Description:
------------
This error happens ins a strange constelation

Test script:
---------------
<?php

class Test
{
protected $_x = null;

public function doSomething()
{
switch ($k) {
case 1: {
break;
}
}
}
}


Actual result:
--------------
PHP Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not
a class member var in
/var/www/Tools/PHP/CodeSniffer/Standards/Cdmm/Sniffs/NamingConventions/ValidVariableNameSniff.php
on line 154
#0
/var/www/Tools/PHP/CodeSniffer/Standards/Cdmm/Sniffs/NamingConventions/ValidVariableNameSniff.php(154):
PHP_CodeSniffer_File->getMemberProperties(61)
#1
/var/www/Tools/PHP/CodeSniffer/Standards/AbstractVariableSniff.php(154):
Cdmm_Sniffs_NamingConventions_ValidVariableNameSniff->processMemberVar(Object(PHP_CodeSniffer_File),
61)
#2
/var/www/Tools/PHP/CodeSniffer/Standards/AbstractScopeSniff.php(190):
PHP_CodeSniffer_Standards_AbstractVariableSniff->processTokenWithinScope(Object(PHP_CodeSniffer_File),
61, 41)
#3 /var/www/Tools/PHP/CodeSniffer/File.php(394):
PHP_CodeSniffer_Standards_AbstractScopeSniff->process(Object(PHP_CodeSniffer_File),
61)
#4 /var/www/Tools/PHP/CodeSniffer.php(708):
PHP_CodeSniffer_File->start(NULL)
#5 /var/www/Tools/PHP/CodeSniffer.php(335):
PHP_CodeSniffer->processFile('/var/www/admin/...')
#6 /var/www/Tools/PHP/CodeSniffer/CLI.php(389):
PHP_CodeSniffer->process(Array, 'Cdmm', Array, false)
#7 /var/www/Tools/phpcs(30): PHP_CodeSniffer_CLI->process()
#8 {main}
thrown in /var/www/Tools/PHP/CodeSniffer/File.php on line 1887

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 5, '09 at 6:12a
activeMay 5, '09 at 6:12a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase