jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/396426 )

Change subject: ApiQueryBase: Fix addWhereFld for PHP 7.2
......................................................................


ApiQueryBase: Fix addWhereFld for PHP 7.2

Idfe23a07d didn't go far enough with this method, it can be passed
arbitrary other scalars in addition to null and arrays.

Bug: T182377
Change-Id: I63ec23f70d6d7ad638aa382b740ec44d0ca47f85
---
M includes/api/ApiQueryBase.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php
index 8e9b1b4..179e6f7 100644
--- a/includes/api/ApiQueryBase.php
+++ b/includes/api/ApiQueryBase.php
@@ -262,7 +262,7 @@
         * @param string|string[] $value Value; ignored if null or empty array;
         */
        protected function addWhereFld( $field, $value ) {
-               if ( $value !== null && count( $value ) ) {
+               if ( $value !== null && !( is_array( $value ) && !$value ) ) {
                        $this->where[$field] = $value;
                }
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/396426
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I63ec23f70d6d7ad638aa382b740ec44d0ca47f85
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to