Discussion:
[Bug 73556] New: PHP Notice: Uninitialized string offset: includes/libs/JavaScriptMinifier.php on line 571
b***@wikimedia.org
2014-11-18 14:50:33 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

Bug ID: 73556
Summary: PHP Notice: Uninitialized string offset:
includes/libs/JavaScriptMinifier.php on line 571
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: JavaScript
Assignee: wikibugs-***@lists.wikimedia.org
Reporter: ***@tiscali.it
CC: ***@gmail.com, ***@gmail.com,
***@wikimedia.org
Blocks: 39480
Web browser: ---
Mobile Platform: ---

-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
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-18 15:05:19 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

--- Comment #1 from Krinkle <***@gmail.com> ---
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.
b***@wikimedia.org
2014-11-18 15:16:08 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

Bartosz Dziewoński <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC|***@gmail.com |***@gmail.com
Component|JavaScript |ResourceLoader
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-19 12:52:00 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

Andre Klapper <***@wikimedia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Priority|Unprioritized |Normal
Version|unspecified |1.25-git
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 23:41:31 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

--- Comment #2 from Krinkle <***@gmail.com> ---
@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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 23:49:06 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73556

James Forrester <***@wikimedia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |***@wikimedia.org
Assignee|wikibugs-***@lists.wikimedia. |***@gmail.com
|org |
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Loading...