r108876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108875‎ | r108876 | r108877 >
Date:23:14, 13 January 2012
Author:reedy
Status:ok (Comments)
Tags:todo 
Comment:
Rather than using an error code of unknownerror, use the error code returned by EditPage if it's a string, and it has length, else just return the usual "unknownerror"
Modified paths:
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -347,7 +347,11 @@
348348 $this->dieUsageMsg( $errors[0] ); // TODO: Add new errors to message map
349349 break;
350350 default:
351 - $this->dieUsageMsg( array( 'unknownerror', $status->value ) );
 351+ if ( is_string( $status->value ) && strlen( $status->value ) ) {
 352+ $this->dieUsage( "An unknown return value was returned by Editpage. The code returned was \"{$status->value}\"" , $status->value );
 353+ } else {
 354+ $this->dieUsageMsg( array( 'unknownerror', $status->value ) );
 355+ }
352356 }
353357 $apiResult->addValue( null, $this->getModuleName(), $r );
354358 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r108933RELEASE-NOTES-1.19 for r108876reedy18:32, 14 January 2012

Comments

#Comment by Krinkle (talk | contribs)   23:14, 13 January 2012

Wohoo!

#Comment by 😂 (talk | contribs)   17:48, 14 January 2012

Release-notes?

Status & tagging log