X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiEditPage.php;h=0b7ac410b11a0c6bb57fd81f0da190e23396bab7;hb=3fa47f5bd9d4f0d347fdff3c94e70bb676394818;hp=19b1950cb62fd3011fa3ff4aa9137a2fb5bf7f3c;hpb=7f04814796855df90816087a60a5c8b1759ff609;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 19b1950cb6..0b7ac410b1 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -340,16 +340,11 @@ class ApiEditPage extends ApiBase { $this->dieUsageMsg( 'summaryrequired' ); case EditPage::AS_END: + default: // $status came from WikiPage::doEdit() $errors = $status->getErrorsArray(); $this->dieUsageMsg( $errors[0] ); // TODO: Add new errors to message map break; - default: - if ( is_string( $status->value ) && strlen( $status->value ) ) { - $this->dieUsage( "An unknown return value was returned by Editpage. The code returned was \"{$status->value}\"" , $status->value ); - } else { - $this->dieUsageMsg( array( 'unknownerror', $status->value ) ); - } } $apiResult->addValue( null, $this->getModuleName(), $r ); }