From: Sam Reed Date: Thu, 22 Jul 2010 21:44:07 +0000 (+0000) Subject: $this isn't valid in a static function. Fix for r46507 X-Git-Tag: 1.31.0-rc.0~36005 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=1d28b9ed350ae3d9c351273fb61b60453a88e04d;p=lhc%2Fweb%2Fwiklou.git $this isn't valid in a static function. Fix for r46507 Return error wrapped in array as per rest of code --- diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 44a96f2a31..6b3829fea8 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -143,7 +143,7 @@ class ApiDelete extends ApiBase { $error = ''; if ( !wfRunHooks( 'ArticleDelete', array( &$article, &$wgUser, &$reason, $error ) ) ) { - $this->dieUsageMsg( array( 'hookaborted', $error ) ); + return array( array( 'hookaborted', $error ) ); } // Luckily, Article.php provides a reusable delete function that does the hard work for us