Merge "Use READ_LATEST constant and fix a soft type hint"

This commit is contained in:
jenkins-bot 2019-10-24 18:37:13 +00:00 committed by Gerrit Code Review
commit 6e48f16af6
2 changed files with 2 additions and 2 deletions

View file

@ -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 ) {

View file

@ -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 );