jenkins-bot has submitted this change and it was merged.
Change subject: Fix return type regression in Ib13b05a2
......................................................................
Fix return type regression in Ib13b05a2
The cast to int was accidentally lost, breaking strict type checks.
Add the cast back and update doc.
Change-Id: I55499d2f8132aab0f2bfa81ed448cdc470e59e9f
---
M tag/TranslatablePage.php
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Siebrand: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 8200999..1127bb5 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -567,7 +567,7 @@
/**
* @param $tag
* @param int $dbt
- * @return array|bool False if tag is not found
+ * @return int|bool False if tag is not found, else revision id
*/
protected function getTag( $tag, $dbt = DB_SLAVE ) {
if ( !$this->getTitle()->exists() ) {
@@ -590,7 +590,8 @@
$options = array( 'ORDER BY' => 'rt_revision DESC' );
- return $db->selectField( 'revtag', 'rt_revision', $conds,
__METHOD__, $options );
+ $value = $db->selectField( 'revtag', 'rt_revision', $conds,
__METHOD__, $options );
+ return $value === false ? $value : (int)$value;
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/283159
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I55499d2f8132aab0f2bfa81ed448cdc470e59e9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits