dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ApiQueryBase: Fix addWhereFld for PHP 7.2
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryBase.php
diff --git
a/includes/api/ApiQueryBase.php
b/includes/api/ApiQueryBase.php
index
6987dfb
..
179e6f7
100644
(file)
--- 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 ) {
* @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;
}
}
$this->where[$field] = $value;
}
}