Page MenuHomePhabricator

"Uninitialized string offset: 72" errors from SpaceBeforeSingleLineCommentSniff.php
Closed, InvalidPublic


In trying to install composer test on mw-config, I got a lot of:

PHP Notice: Uninitialized string offset: 72 in /Users/jdforrester/Documents/git/mediawiki-config/vendor/mediawiki/mediawiki-codesniffer/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php on line 69


Related Gerrit Patches:
mediawiki/tools/codesniffer : masterStop reference of string $content as an array

Event Timeline

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 20 2016, 12:02 AM

@Jdforrester-WMF : I am unable to recreate the PHP Notice by running composer test on mw-config. Can you explain how to?
I also found that this kind of Notice comes when we reference a string like it is an array. ( $content over here in line 69). Once I test it locally after recreating the error, I'll submit a patch.

Change 283384 had a related patch set uploaded (by Aashaka):
Stop reference of string $content as an array

Change 283384 abandoned by Umherirrender:
Stop reference of string $content as an array

The code lines changed by I11e953962026637bed95e1975bde97504fff83ea, seems fixed in that context

Umherirrender closed this task as Invalid.Aug 4 2017, 8:04 PM
Umherirrender added a subscriber: Umherirrender.

Handled by T114633, but not a duplicate