From d79dd00e01b69ce2a69ee75a2f1cf931b8e69033 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Wed, 23 Oct 2019 12:45:51 +0200 Subject: [PATCH] Use READ_LATEST constant and fix a soft type hint Change-Id: I2123c5efe01a5b42daeec9c7b0eefce089864657 --- includes/special/SpecialNotifications.php | 2 +- maintenance/generateSampleNotifications.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/special/SpecialNotifications.php b/includes/special/SpecialNotifications.php index 97e94587c..0934a65e0 100644 --- a/includes/special/SpecialNotifications.php +++ b/includes/special/SpecialNotifications.php @@ -12,7 +12,7 @@ class SpecialNotifications extends SpecialPage { } /** - * @param string $par + * @param string|null $par * @suppress SecurityCheck-DoubleEscaped Different members of $notifArray being conflated */ public function execute( $par ) { diff --git a/maintenance/generateSampleNotifications.php b/maintenance/generateSampleNotifications.php index f47d34ed7..e95c57898 100644 --- a/maintenance/generateSampleNotifications.php +++ b/maintenance/generateSampleNotifications.php @@ -211,7 +211,7 @@ class GenerateSampleNotifications extends Maintenance { private function addToPageContent( Title $title, User $agent, $contentText ) { $page = WikiPage::factory( $title ); $previousContent = ""; - $page->loadPageData( 'fromdbmaster' ); + $page->loadPageData( WikiPage::READ_LATEST ); $revision = $page->getRevision(); if ( $revision ) { $content = $revision->getContent( RevisionRecord::FOR_PUBLIC );