summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2007-02-05 16:03:39 +0000
committerThomas BrĂ¼derli2007-02-05 16:03:39 +0000
commit220b1413fb29059e7f9450d93b64f1eb854a1311 (patch)
treee9c5dcdac3a0b5ad9154bd9806ae7b1f43ebcf22
parentc330b7962ae9af5093cfe47e9cb981f6e9720ca2 (diff)
downloaditools-220b1413fb29059e7f9450d93b64f1eb854a1311.tar.gz
itools-220b1413fb29059e7f9450d93b64f1eb854a1311.tar.bz2
itools-220b1413fb29059e7f9450d93b64f1eb854a1311.zip
Prevent from invalid quoting: strval(intval('000080')) == strval('000080') is true
-rw-r--r--itjs.class2
1 files changed, 1 insertions, 1 deletions
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