Last modified: 2014-11-20 23:49:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T75556, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73556 - PHP Notice: Uninitialized string offset: includes/libs/JavaScriptMinifier.php on line 571
PHP Notice: Uninitialized string offset: includes/libs/JavaScriptMinifier.php...
Status: ASSIGNED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.25-git
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2014-11-18 14:50 UTC by Nemo
Modified: 2014-11-20 23:49 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2014-11-18 14:50:33 UTC
-rakkaus:#mediawiki-i18n- [18-Nov-2014 14:18:47 UTC] PHP Notice:  Uninitialized string offset: 710 in /www/translatewiki.net/w/includes/libs/JavaScriptMinifier.php on line 571
Comment 1 Krinkle 2014-11-18 15:05:19 UTC
Excerpt:

  class JavaScriptMinifier {
  public static function minify( $s, $statementsOnOwnLine = false, $maxLineLength = 1000 ) {
    // ..

    $out = '';
    $pos = 0;
    $length = strlen( $s );
    $lineLength = 0;
    $last = ';';
    while( $pos < $length ) {
      // ..

      $out .= $token;
      $lineLength += $end - $pos;
      $last = $s[$end - 1];
      $pos = $end;


The while loop manipulates $end to reflect where we are in the code. In some cases it advanced artificially based on changes or assumptions it made. I guess it must be off in some cases.

Does this one happen often on translatewiki? Can you produce a stack trace (so that we know whether it's triggered by ResourceLoaderFileModule, WikiModule, something else, etc. And ideally also an excerpt of $s (e.g. the first 20 characters) which will probably identify what the input script was.
Comment 2 Krinkle 2014-11-20 23:41:31 UTC
@Nemo: Can you help get a test case? By getting a stack trace we'll narrow down whehter this is from a file module, wiki module or other generated script. And by getting the argument we'll identify the script in question.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links