Convert $archivedRevisionCount to integer.
authorPetr Pchelko <ppchelko@wikimedia.org>
Tue, 20 Nov 2018 22:55:35 +0000 (14:55 -0800)
committerPetr Pchelko <ppchelko@wikimedia.org>
Tue, 20 Nov 2018 23:56:31 +0000 (15:56 -0800)
Before I81a70ca03fd219d2e96b17714645d9cc4f99b3b9
the archivedRevisionCount argument of the ArticleDeleteComplete
hook used to be an integer, now it's an string. This is backwards
incompatible and needs to be changed back.

Bug: T210013
Change-Id: I297594803fe05cc00cdf209696933b2450d020b6

includes/page/WikiPage.php

index 6a6b2a6..9f623ba 100644 (file)
@@ -2729,7 +2729,7 @@ class WikiPage implements Page, IDBAccessObject {
                        // in the job queue to avoid simultaneous deletion operations would add overhead.
                        // Number of archived revisions cannot be known beforehand, because edits can be made
                        // while deletion operations are being processed, changing the number of archivals.
-                       $archivedRevisionCount = $dbw->selectField(
+                       $archivedRevisionCount = (int)$dbw->selectField(
                                'archive', 'COUNT(*)',
                                [
                                        'ar_namespace' => $this->getTitle()->getNamespace(),