Merge "ApiQueryBase: Fix addWhereFld for PHP 7.2"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 8 Dec 2017 17:52:22 +0000 (17:52 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 8 Dec 2017 17:52:22 +0000 (17:52 +0000)
includes/api/ApiQueryBase.php

index 8e9b1b4..179e6f7 100644 (file)
@@ -262,7 +262,7 @@ abstract class ApiQueryBase extends ApiBase {
         * @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;
                }
        }