From 1d28b9ed350ae3d9c351273fb61b60453a88e04d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 22 Jul 2010 21:44:07 +0000 Subject: [PATCH] $this isn't valid in a static function. Fix for r46507 Return error wrapped in array as per rest of code --- includes/api/ApiDelete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1