r56496 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r56495
|
r56496
|
r56497
>
Date:
09:31, 17 September 2009
Author:
werdna
Status:
ok
Tags:
Comment:
In Xml::encodeJsVar, keep backwards compatibility by encoding empty arrays as empty arrays rather than empty objects. Regression in
r56032
, reported as
bug 20671
Modified paths:
/trunk/phase3/includes/Xml.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/Xml.php
—
—
@@ -568,7 +568,8 @@
569
569
} elseif ( is_int( $value ) ) {
570
570
$s = $value;
571
571
} elseif ( is_array( $value ) && // Make sure it's not associative.
572
- array_keys($value) === range(0,count($value)-1)
572
+ array_keys($value) === range( 0, count($value) - 1 ) ||
573
+ count($value) == 0
573
574
) {
574
575
$s = '[';
575
576
foreach ( $value as $elt ) {
Follow-up revisions
Revision
Commit summary
Author
Date
r56497
Merge
r56496
(JS variable regression)
werdna
09:33, 17 September 2009
r56797
merged
r56490
,
r56496
aaron
00:59, 23 September 2009
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r56032
Add AJAX category management system. Includes suggestion system, dialogs for ...
werdna
15:02, 8 September 2009
Status & tagging log
22:15, 29 September 2009
Brion VIBBER
(
talk
|
contribs
)
changed the
status
of r56496
[
removed:
new
added:
ok]