jenkins-bot has submitted this change and it was merged. Change subject: Invoke database connection in ApiQueryGlobalBlocks::execute ......................................................................
Invoke database connection in ApiQueryGlobalBlocks::execute This fixes the following error: Exception Caught: Call to a member function buildLike() on a non-object (null)" This is a follow-up of commit 53dee904. Bug: T149232 Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe --- M includes/api/ApiQueryGlobalBlocks.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGlobalBlocks.php b/includes/api/ApiQueryGlobalBlocks.php index ede610e..a7231ba 100644 --- a/includes/api/ApiQueryGlobalBlocks.php +++ b/includes/api/ApiQueryGlobalBlocks.php @@ -94,6 +94,7 @@ $lower = $upper = IP::toHex( $params['ip'] ); } $prefix = substr( $lower, 0, 4 ); + $dbr = GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE ); $this->addWhere( [ 'gb_range_start ' . $dbr->buildLike( $prefix, $dbr->anyString() ), 'gb_range_start <= ' . $dbr->addQuotes( $lower ), -- To view, visit https://gerrit.wikimedia.org/r/318160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalBlocking Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: 20after4 <mmod...@wikimedia.org> Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org> Gerrit-Reviewer: Dereckson <dereck...@espace-win.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits