jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361291 )
Change subject: Fix: cargoRecreateData.php crash after the template is deleted by the user ...................................................................... Fix: cargoRecreateData.php crash after the template is deleted by the user Change-Id: Ieb91d916bfaec5c45c687719a9abdeb9ec4eb9d4 --- M maintenance/cargoRecreateData.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/cargoRecreateData.php b/maintenance/cargoRecreateData.php index bb1aa09..ca04fec 100644 --- a/maintenance/cargoRecreateData.php +++ b/maintenance/cargoRecreateData.php @@ -112,6 +112,11 @@ foreach( $templatesForThisTable as $templatePageID ) { $templateTitle = Title::newFromID( $templatePageID ); + if( $templateTitle == null ) { + // It is possible that the Template to which the table is associated, is now deleted by the user + print "Template (Template Page ID = $templatePageID) does not exist, cannot recreate data corresponding to this template\n"; + continue; + } if ( !$quiet ) { print "Handling template that adds to this table: " . $templateTitle->getText() . "\n"; } -- To view, visit https://gerrit.wikimedia.org/r/361291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb91d916bfaec5c45c687719a9abdeb9ec4eb9d4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Fz-29 <f29ah...@gmail.com> Gerrit-Reviewer: Nischayn22 <nischay...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits