X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBase.php;h=179e6f7b2512d16ecc60c95541c200d10daf307f;hp=6987dfb13fa9b2a91a19dc07f47b291ac373f571;hb=f938f15bea1a27f098fc7a0f93673adba31d2efe;hpb=426719108b86bba70e5b321e3386f40849471426 diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 6987dfb13f..179e6f7b25 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -262,9 +262,7 @@ abstract class ApiQueryBase extends ApiBase { * @param string|string[] $value Value; ignored if null or empty array; */ protected function addWhereFld( $field, $value ) { - // Use count() to its full documented capabilities to simultaneously - // test for null, empty array or empty countable object - if ( count( $value ) ) { + if ( $value !== null && !( is_array( $value ) && !$value ) ) { $this->where[$field] = $value; } }