r113211 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r113210
|
r113211
|
r113212
>
Date:
02:09, 7 March 2012
Author:
catrope
Status:
ok
Tags:
Comment:
It seems that parseMsg() sometimes receives strings, probably from bad dieUsageMsg() callers or badly formatter error arrays. I don't want to have to track this down, so I'm making it fail gracefully and just cast any strings to arrays
Modified paths:
/trunk/phase3/includes/api/ApiBase.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/api/ApiBase.php
—
—
@@ -1272,6 +1272,7 @@
1273
1273
* @return array('code' => code, 'info' => info)
1274
1274
*/
1275
1275
public function parseMsg( $error ) {
1276
+ $error = (array)$error; // It seems strings sometimes make their way in here
1276
1277
$key = array_shift( $error );
1277
1278
1278
1279
// Check whether the error array was nested
Follow-up revisions
Revision
Commit summary
Author
Date
r113212
1.19wmf1: MFT
r113211
catrope
02:10, 7 March 2012
r113235
MFT
r113171
,
r113195
,
r113211
reedy
15:14, 7 March 2012
Status & tagging log
15:15, 7 March 2012
Reedy
(
talk
|
contribs
)
changed the
tags
for r113211
[
removed:
1.19]
14:57, 7 March 2012
Reedy
(
talk
|
contribs
)
changed the
status
of r113211
[
removed:
new
added:
ok]
02:10, 7 March 2012
Catrope
(
talk
|
contribs
)
changed the
tags
for r113211
[
added:
1.19]