X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FDatabase.php;h=e9db0a38d2f460c0dfd597bf3b4bb8177564583e;hb=6f21ad753541913e02164425c71292ce89b5eda0;hp=5863750331f7abe2a627ef574c4481741a8cfb1a;hpb=45a998174af18c39b3deaa1163c74429fd75a329;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Database.php b/includes/Database.php index 5863750331..e9db0a38d2 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1569,8 +1569,7 @@ class Database { $list .= "$value"; } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array($value) ) { if( count( $value ) == 0 ) { - // Empty input... or should this throw an error? - $list .= '0'; + throw new MWException( __METHOD__.': empty input' ); } elseif( count( $value ) == 1 ) { // Special-case single values, as IN isn't terribly efficient $list .= $field." = ".$this->addQuotes( $value[0] );