dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
58cb1f8
)
Merge "database: Add extra sanity check to selectFieldValues()"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Thu, 18 Feb 2016 14:46:29 +0000
(14:46 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Thu, 18 Feb 2016 14:46:29 +0000
(14:46 +0000)
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
d741b2f
..
351d438
100644
(file)
--- a/
includes/db/Database.php
+++ b/
includes/db/Database.php
@@
-1069,7
+1069,9
@@
abstract class DatabaseBase implements IDatabase {
$table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
) {
if ( $var === '*' ) { // sanity
- throw new DBUnexpectedError( $this, "Cannot use a * field: got '$var'" );
+ throw new DBUnexpectedError( $this, "Cannot use a * field" );
+ } elseif ( !is_string( $var ) ) { // sanity
+ throw new DBUnexpectedError( $this, "Cannot use an array of fields" );
}
if ( !is_array( $options ) ) {