X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUtils.php;h=bcfda65c9ca14cef75aac304396f0512dba500d5;hb=f34554c6c2cd8fe99fe2e8907bfc196a4884416a;hp=9c9eaaa2611eff24d62d24eb2d30e2da372d4aad;hpb=a975d97a8da64864c3c49f1c54f571eb4ea5b81a;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Utils.php b/application/Utils.php index 9c9eaaa2..bcfda65c 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -95,14 +95,14 @@ function escape($input) return null; } - if (is_bool($input)) { + if (is_bool($input) || is_int($input) || is_float($input) || $input instanceof DateTimeInterface) { return $input; } if (is_array($input)) { $out = array(); foreach ($input as $key => $value) { - $out[$key] = escape($value); + $out[escape($key)] = escape($value); } return $out; }