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

  ID: 20252
  Updated by: gsherwood@squiz.net
  Reported By: fike dot root@gmail.com
-Summary: Unitialized string offset
+Summary: Unitialized string offset when package name starts
                     with underscore
  Status: Open
  Type: Bug
  Package: PHP_CodeSniffer
  Operating System: lubuntu 13.10
  Package Version: 1.5.2
  PHP Version: 5.5.3
-Assigned To:
+Assigned To: squiz
  Roadmap Versions:
  New Comment:

-Summary: Unitialized string offset
+Summary: Unitialized string offset when package name
               starts with underscore
-Assigned To:
+Assigned To: squiz



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

[2014-04-24 21:06:00] etki

Description:
------------
Hi.
I constantly get following error while analyzing different files:

PHP Notice: Uninitialized string offset: 0 in
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Stan
dards/PEAR/Sniffs/Commenting/FileCommentSniff.php on line 606

I can confirm that it happens when @package tag starts with underscore,

however, i think i've encountered this in different scenarios. The
minimal
scenario that triggers error is pasted below.

Test script:
---------------
<?php
/**
  * @package _helpers
  */
class MigrationHelper
{
}

Actual result:
--------------
Backtrace:
PHP Notice: Uninitialized string offset: 0 in
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Stan
dards/PEAR/Sniffs/Commenting/FileCommentSniff.php on line 606
PHP Stack trace:
PHP 1. {main}()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcs:0
PHP 2. PHP_CodeSniffer_CLI->process()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcs:37
PHP 3. PHP_CodeSniffer->process()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.
php:614
PHP 4. PHP_CodeSniffer->processFile()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php:
488
PHP 5. PHP_CodeSniffer->_processFile()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php:
1340
PHP 6. PHP_CodeSniffer_File->start()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php:
1460
PHP 7. PEAR_Sniffs_Commenting_ClassCommentSniff->process()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/File.
php:506
PHP 8. PEAR_Sniffs_Commenting_FileCommentSniff->processTags()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Stan
dards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:200
PHP 9. call_user_func()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Stan
dards/PEAR/Sniffs/Commenting/FileCommentSniff.php:461
PHP 10. PEAR_Sniffs_Commenting_FileCommentSniff-
processPackage()
/home/fike/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Stan
dards/PEAR/Sniffs/Commenting/FileCommentSniff.php:461

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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 29, '14 at 1:37a
activeApr 29, '14 at 1:39a
posts2
users1
websitepear.php.net

1 user in discussion

Gsherwood: 2 posts

People

Translate

site design / logo © 2022 Grokbase