From b5e4e0758cd9634eee5a48c7330a1d5358b4b7c0 Mon Sep 17 00:00:00 2001 From: paladox Date: Wed, 27 Dec 2023 23:44:13 +0000 Subject: [PATCH] Fix duplicate getPage functions in Source Causing a fatal. --- includes/Source.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Source.php b/includes/Source.php index a119cae..ba3b435 100644 --- a/includes/Source.php +++ b/includes/Source.php @@ -238,7 +238,7 @@ class Source { if ( $this->page === null ) { // Access the property directly to avoid an infinite loop. if ( $this->title != null) { - $this->page = static::getPage(); + $this->page = static::getPageObject(); } else { throw new Exception( 'Unable to create Page for this Source because Title is null.' ); } @@ -251,7 +251,7 @@ class Source { * Workaround for MediaWiki 1.36+ which deprecated Wikipage::factory. * @return WikiPage object */ - private static function getPage() { + private static function getPageObject() { if ( method_exists( MediaWikiServices::class, 'getWikiPageFactory' ) ) { $wikiPageFactory = MediaWikiServices::getInstance()->getWikiPageFactory(); return $wikiPageFactory->newFromTitle( $this->title );