Skip to content

Commit

Permalink
Make onDiscordArticleInserted a static function (#60)
Browse files Browse the repository at this point in the history
extension.json#hooks calls onDiscordArticleInserted as a static function thus you get:

ErrorException from line 174 of /srv/mediawiki/w/includes/Hooks.php: PHP Deprecated: Non-static method DiscordNotificationsCore::onDiscordArticleInserted() should not be called statically
  • Loading branch information
paladox authored and kulttuuri committed Dec 28, 2019
1 parent 10a0f2e commit 225a055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DiscordNotificationsCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static function onDiscordArticleSaved( WikiPage $article, $user, $content
* Occurs after a new article has been created.
* @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleInsertComplete
*/
public function onDiscordArticleInserted( WikiPage $article, $user, $text, $summary, $isminor, $iswatch, $section, $flags, $revision ) {
public static function onDiscordArticleInserted( WikiPage $article, $user, $text, $summary, $isminor, $iswatch, $section, $flags, $revision ) {
global $wgDiscordNotificationAddedArticle, $wgDiscordIncludeDiffSize;
if ( !$wgDiscordNotificationAddedArticle ) return;

Expand Down

0 comments on commit 225a055

Please sign in to comment.