jenkins-bot has submitted this change and it was merged.
Change subject: (Bug 44357) Update checkStorage.php to not use deprecated
Revision::getText()
......................................................................
(Bug 44357) Update checkStorage.php to not use deprecated Revision::getText()
Change-Id: Id632867207960ba5c25d2b6eaba06f051fb1e681
---
M maintenance/storage/checkStorage.php
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
IAlex: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/storage/checkStorage.php
b/maintenance/storage/checkStorage.php
index b9bfe81..505313d 100644
--- a/maintenance/storage/checkStorage.php
+++ b/maintenance/storage/checkStorage.php
@@ -443,13 +443,21 @@
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;
}
--
To view, visit https://gerrit.wikimedia.org/r/45937
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id632867207960ba5c25d2b6eaba06f051fb1e681
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Platonides <[email protected]>
Gerrit-Reviewer: Anja Jentzsch <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Ataherivand <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Jens Ohlig <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: John Erling Blad <[email protected]>
Gerrit-Reviewer: Lydia Pintscher <[email protected]>
Gerrit-Reviewer: Markus Kroetzsch <[email protected]>
Gerrit-Reviewer: Nikola Smolenski <[email protected]>
Gerrit-Reviewer: Platonides <[email protected]>
Gerrit-Reviewer: Silke Meyer <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits