include a formatting error if they pass an array where we're not expecting one
This commit is contained in:
@@ -541,8 +541,10 @@ class MeekroDB {
|
||||
if (is_array($result)) {
|
||||
if (! $array_type) $result = $result[0];
|
||||
else $result = '(' . implode(',', $result) . ')';
|
||||
|
||||
if (is_array($result)) $this->nonSQLError("Badly formatted SQL query: $sql -- you passed an array but I didn't expect one!");
|
||||
}
|
||||
|
||||
|
||||
$sql = substr_replace($sql, $result, $new_pos, $length_type + $arg_number_length);
|
||||
$pos_adj += strlen($result) - ($length_type + $arg_number_length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user