Bug #19361 [Com]: Undefined index: bracket_closer in .../Tokenizers/CSS.php
| From: | news_001@washammwa.de | Date: | Wed, 04 Apr 2012 08:46:26 +0000 |
| Subject: | Bug #19361 [Com]: Undefined index: bracket_closer in .../Tokenizers/CSS.php | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8507@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19361&edit=1
ID: 19361
Comment by: news_001@washammwa.de
Reported By: news_001 at washammwa dot de
Summary: Undefined index: bracket_closer in
.../Tokenizers/CSS.php
Status: Feedback
Type: Bug
Package: PHP_CodeSniffer
Operating System: debian squeez
Package Version: 1.3.3
PHP Version: 5.3.3
Assigned To: squiz
Roadmap Versions:
New Comment:
CSS file is:
li { background:url(<?php print $staticserver; ?>images/bullet.gif) left
1px no-repeat; margin:0px; padding-left:10px; margin-bottom:5px;
line-height:13px;}
I know it is not usual to have css files to be executed by php but your
tokenizer should be robust enought.
csslint (http://csslint.net/about.html) has no trouble to tokenize it.
A sniff that warns that this type of dynamic css smells should be
available.
Previous Comments:
------------------------------------------------------------------------
[2012-03-30 22:46:36] squiz
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
Do you happen to have the CSS file that PHPCS was running on when the
error occurred? I wont be able to fix this with just a backtrace because
the order of tokens
is really important for this.
------------------------------------------------------------------------
[2012-03-30 16:32:47] christianweiss
Description:
------------
[exec] PHP Notice: Undefined index: bracket_closer in
/usr/share/php/PHP/CodeSniffer/Tokenizers/CSS.php on line 350
[exec] PHP Stack trace:
[exec] PHP 1. {main}() /usr/bin/phpcs:0
[exec] PHP 2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:37
[exec] PHP 3. PHP_CodeSniffer->process()
/usr/share/php/PHP/CodeSniffer/CLI.php:551
[exec] PHP 4. PHP_CodeSniffer->processFile()
/usr/share/php/PHP/CodeSniffer.php:476
[exec] PHP 5. PHP_CodeSniffer->_processFile()
/usr/share/php/PHP/CodeSniffer.php:1159
[exec] PHP 6. PHP_CodeSniffer_File->start()
/usr/share/php/PHP/CodeSniffer.php:1279
[exec] PHP 7. PHP_CodeSniffer_File->_parse()
/usr/share/php/PHP/CodeSniffer/File.php:382
[exec] PHP 8. PHP_CodeSniffer_File::tokenizeString()
/usr/share/php/PHP/CodeSniffer/File.php:586
[exec] PHP 9. PHP_CodeSniffer_Tokenizers_CSS->processAdditional()
/usr/share/php/PHP/CodeSniffer/File.php:969
[exec] PHP Notice: Undefined index: bracket_closer in
/usr/share/php/PHP/CodeSniffer/Tokenizers/CSS.php on line 351
[exec] PHP Stack trace:
[exec] PHP 1. {main}() /usr/bin/phpcs:0
[exec] PHP 2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:37
[exec] PHP 3. PHP_CodeSniffer->process()
/usr/share/php/PHP/CodeSniffer/CLI.php:551
[exec] PHP 4. PHP_CodeSniffer->processFile()
/usr/share/php/PHP/CodeSniffer.php:476
[exec] PHP 5. PHP_CodeSniffer->_processFile()
/usr/share/php/PHP/CodeSniffer.php:1159
[exec] PHP 6. PHP_CodeSniffer_File->start()
/usr/share/php/PHP/CodeSniffer.php:1279
[exec] PHP 7. PHP_CodeSniffer_File->_parse()
/usr/share/php/PHP/CodeSniffer/File.php:382
[exec] PHP 8. PHP_CodeSniffer_File::tokenizeString()
/usr/share/php/PHP/CodeSniffer/File.php:586
[exec] PHP 9. PHP_CodeSniffer_Tokenizers_CSS->processAdditional()
/usr/share/php/PHP/CodeSniffer/File.php:969
Directly from my ant output (Hudson CI)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19361&edit=1