From c8a66d678a14274b04f0d5fb9f11470f293fcf14 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 26 Jan 2013 15:36:54 +0100 Subject: [PATCH] (Bug 44357) Update checkStorage.php to not use deprecated Revision::getText() Change-Id: Id632867207960ba5c25d2b6eaba06f051fb1e681 --- maintenance/storage/checkStorage.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index b9bfe8109c..505313d570 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -443,13 +443,21 @@ class CheckStorage { function importRevision( &$revision, &$importer ) { $id = $revision->getID(); - $text = $revision->getText(); + $content = $revision->getContent( Revision::RAW ); + $id = $id ? $id : ''; + + if ( $content === null ) { + echo "Revision $id is broken, we have no content available\n"; + return; + } + + $text = $content->serialize(); if ( $text === '' ) { // This is what happens if the revision was broken at the time the // dump was made. Unfortunately, it also happens if the revision was // legitimately blank, so there's no way to tell the difference. To // be safe, we'll skip it and leave it broken - $id = $id ? $id : ''; + echo "Revision $id is blank in the dump, may have been broken before export\n"; return; } -- 2.20.1