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

ID: 19913
Updated by: gemineye@gmx.de
Reported By: gemineye at gmx dot de
Summary: Running phpcs in interactive mode causes warnings
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Debian
Package Version: 1.4.5
PHP Version: 5.4.11
Roadmap Versions:
New Comment:

Temp fix around line 1020 (CodeSniffer.php)

foreach ($this->listeners as $listenerClass) {
//FIX LINES
if(is_object($listenerClass)) {
$listenerClass = get_class($listenerClass);
}
// Work out the internal code for this sniff. Detect usage
of namespace
// separators instead of underscores to support PHP
namespaces.
if (strstr($listenerClass, '\\') === false) {
$parts = explode('_', $listenerClass);
} else {
$parts = explode('\\', $listenerClass);
}


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

[2013-04-26 09:50:47] gemineye

Description:
------------
After running 'phpcs -a' and getting first error try pressing ENTER to
recheck:

Notice: Undefined variable: code in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1028

Warning: get_class_vars() expects parameter 1 to be string, object given
in /usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1035

Warning: Illegal offset type in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1040

Warning: Illegal offset type in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1060


Expected result:
----------------
I expect to see the error list again.

Actual result:
--------------
Notice: Undefined variable: code in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1028

Warning: get_class_vars() expects parameter 1 to be string, object given
in /usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1035

Warning: Illegal offset type in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1040

Warning: Illegal offset type in
/usr/local/zend/share/pear/PHP/CodeSniffer.php on line 1060

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 26, '13 at 7:53a
activeApr 26, '13 at 7:53a
posts1
users1
websitepear.php.net

1 user in discussion

Gemineye: 1 post

People

Translate

site design / logo © 2022 Grokbase