$this isn't valid in a static function. Fix for r46507
authorSam Reed <reedy@users.mediawiki.org>
Thu, 22 Jul 2010 21:44:07 +0000 (21:44 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 22 Jul 2010 21:44:07 +0000 (21:44 +0000)
Return error wrapped in array as per rest of code

includes/api/ApiDelete.php

index 44a96f2..6b3829f 100644 (file)
@@ -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