Merge "Revert "selenium: add new message banner test to user spec""
[lhc/web/wiklou.git] / includes / api / ApiQueryBase.php
index 6987dfb..e0ab53a 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Sep 7, 2006
- *
  * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
@@ -262,9 +258,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;
                }
        }