$this->dieUsageMsg( 'missingtext' );
}
- $titleObj = $this->getTitleOrPageId( $params );
+ $pageObj = $this->getTitleOrPageId( $params );
+ $titleObj = $pageObj->getTitle();
if ( $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
}
$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 );
}