if ((substr_count($sql, '?') != count($args)) && (count($args) > 0)) {
// Question: Should we continue or stop the query here?
- Logger::error('Parameter mismatch. Query "'.$sql.'" - Parameters '.print_r($args, true));
+ Logger::warning('Query parameters mismatch.', ['query' => $sql, 'args' => $args, 'callstack' => System::callstack()]);
}
$sql = self::cleanQuery($sql);