dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d237380
)
database: Add extra sanity check to selectFieldValues()
author
Aaron Schulz
<aschulz@wikimedia.org>
Tue, 16 Feb 2016 21:42:34 +0000
(13:42 -0800)
committer
Krinkle
<krinklemail@gmail.com>
Thu, 18 Feb 2016 14:38:44 +0000
(14:38 +0000)
Change-Id: Ia2788ea84bd099550655930188365984e5274678
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
ef4a7b7
..
98473a5
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 = array(), $join_conds = array()
) {
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 ) ) {