From 220b1413fb29059e7f9450d93b64f1eb854a1311 Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Mon, 5 Feb 2007 16:03:39 +0000 Subject: Prevent from invalid quoting: strval(intval('000080')) == strval('000080') is true --- itjs.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itjs.class b/itjs.class index e5c0b25..45617e8 100644 --- a/itjs.class +++ b/itjs.class @@ -67,7 +67,7 @@ function encode($values) if (!is_array($value)) { - $quote = (strval(intval($value)) == strval($value)) ? "" : '"'; + $quote = (strval(intval($value)) === strval($value)) ? "" : '"'; $result .= $quote . strtr($value, array("\0" => '\\0', '"' => '\\"', ""<\\/", "\n" => '\\n', "\r" => '\\r', "\t" => '\\t', "\\" => '\\\\')) . $quote; } else -- cgit v1.2.3