sebastianbergmann/php-token-stream — Issue #19: Notice generated by PHP/Token/Stream.php
Author: linusnorton
Created: 2011-11-04 17:44:02+00:00
State: open

When generating the code coverage report I get the following error.

Generating code coverage report, this may take a moment.PHP Notice: Undefined offset: 21 in /usr/share/php/PHP/Token/Stream.php on line 534
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:126
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:188
PHP 5. PHP_CodeCoverage_Report_HTML->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:366
PHP 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:133
PHP 7. PHP_CodeCoverage_Report_Factory->create() /usr/share/php/PHP/CodeCoverage.php:141
PHP 8. PHP_CodeCoverage->getData() /usr/share/php/PHP/CodeCoverage/Report/Factory.php:65
PHP 9. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() /usr/share/php/PHP/CodeCoverage.php:173
PHP 10. PHP_Token_Stream->getClasses() /usr/share/php/PHP/CodeCoverage.php:486
PHP 11. PHP_Token_Stream->parse() /usr/share/php/PHP/Token/Stream.php:249
PHP 12. PHP_Token_INTERFACE->getInterfaces() /usr/share/php/PHP/Token/Stream.php:396
PHP 13. PHP_Token_INTERFACE->hasInterfaces() /usr/share/php/PHP/Token.php:591
PHP 14. PHP_Token_Stream->offsetGet() /usr/share/php/PHP/Token/Stream.php:0

Notice: Undefined offset: 21 in /usr/share/php/PHP/Token/Stream.php on line 534

Call Stack:
0.0002 326212 1. {main}() /usr/bin/phpunit:0
0.0028 712204 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
0.0029 712668 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:126
7.9393 34072528 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:188
379.0917 60743712 5. PHP_CodeCoverage_Report_HTML->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:366
379.0917 60743836 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:133
379.0920 60781100 7. PHP_CodeCoverage_Report_Factory->create() /usr/share/php/PHP/CodeCoverage.php:141
379.0920 60781100 8. PHP_CodeCoverage->getData() /usr/share/php/PHP/CodeCoverage/Report/Factory.php:65
379.0920 60781100 9. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() /usr/share/php/PHP/CodeCoverage.php:173
393.0177 404786616 10. PHP_Token_Stream->getClasses() /usr/share/php/PHP/CodeCoverage.php:486
393.0177 404786616 11. PHP_Token_Stream->parse() /usr/share/php/PHP/Token/Stream.php:249
393.0178 404788084 12. PHP_Token_INTERFACE->getInterfaces() /usr/share/php/PHP/Token/Stream.php:396
393.0178 404788084 13. PHP_Token_INTERFACE->hasInterfaces() /usr/share/php/PHP/Token.php:591
393.0178 404788128 14. PHP_Token_Stream->offsetGet() /usr/share/php/PHP/Token/Stream.php:0

Unfortunately I haven't been able to track down the root cause. It may be caused by trying to process an invalid PHP file.