Permalink
Browse files

Neutralize setlocale

  • Loading branch information...
1 parent 70a4721 commit 98e71e9e62ed6ff658da358cacf659b4fcf8da81 @vrana committed Jun 4, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 NotORM/Result.php
View
@@ -169,7 +169,10 @@ protected function quote($val) {
if ($val instanceof DateTime) {
$val = $val->format("Y-m-d H:i:s"); //! may be driver specific
}
- return (is_int($val) || is_float($val) || $val instanceof NotORM_Literal // number or SQL code - for example "NOW()"
+ if (is_float($val)) {
+ return sprintf("%F", $val); // otherwise depends on setlocale()
+ }
+ return (is_int($val) || $val instanceof NotORM_Literal // number or SQL code - for example "NOW()"
? (string) $val
: $this->notORM->connection->quote($val)
);

0 comments on commit 98e71e9

Please sign in to comment.