https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

--- Comment #1 from Krinkle <[email protected]> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to