mirror of
https://github.com/dg/dibi.git
synced 2025-08-10 08:04:32 +02:00
fixed invalid escaping sequences in double quoted strings, used \z instead of $
This commit is contained in:
@@ -353,7 +353,7 @@ final class DibiTranslator extends DibiObject
|
||||
case 'i': // signed int
|
||||
case 'u': // unsigned int, ignored
|
||||
// support for long numbers - keep them unchanged
|
||||
if (is_string($value) && preg_match('#[+-]?\d++(e\d+)?$#A', $value)) {
|
||||
if (is_string($value) && preg_match('#[+-]?\d++(e\d+)?\z#A', $value)) {
|
||||
return $value;
|
||||
} else {
|
||||
return $value === NULL ? 'NULL' : (string) (int) ($value + 0);
|
||||
|
Reference in New Issue
Block a user