Skip to content

Commit

Permalink
rex_sql: Bei fullquery in Debug-Ausgabe nicht unnötig quoten (#6047)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Mar 17, 2024
1 parent 0f58ed6 commit 223929c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions redaxo/src/core/lib/sql/sql.php
Expand Up @@ -1325,10 +1325,17 @@ function ($matches) use ($params, &$i) {
}

foreach ($keys as $key) {
if (array_key_exists($key, $params)) {
++$i;
return $this->escape($params[$key]);
if (!array_key_exists($key, $params)) {
continue;
}

++$i;
return match (gettype($params[$key])) {
'boolean' => $params[$key] ? '1' : '0',
'integer' => (string) $params[$key],
'NULL' => 'NULL',
default => $this->escape($params[$key]),
};
}

return $matches[0];
Expand Down

0 comments on commit 223929c

Please sign in to comment.