From d2373fd5ce8472833bab1f0c7f8b532131582466 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 5 Aug 2015 14:20:40 +0200 Subject: make it::fatal exits more discernable --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index 494fb1b..8faac1f 100644 --- a/it.class +++ b/it.class @@ -266,7 +266,7 @@ static function fatal($p) it::error($p); if ($_SERVER['REMOTE_ADDR']) header("HTTP/1.0 500 Internal Server Error"); - exit(1); + exit(99); } -- cgit v1.2.3 From 534899acf620b83936a8e445c806cc481d789050 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 13:59:59 +0200 Subject: correctly handle non-utf8 in keys --- it.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 8faac1f..e6f8006 100644 --- a/it.class +++ b/it.class @@ -429,8 +429,8 @@ static function any2utf8($value, $errprefix = "") if (is_array($value)) { foreach ($value as $idx => $v) - if (is_string($v) || is_array($v)) - $value[$idx] = self::any2utf8($v, $errprefix); + $newarr[self::any2utf8($idx)] = is_string($v) || is_array($v) ? self::any2utf8($v, $errprefix) : $v; + $value = $newarr; } else if (is_string($value)) { -- cgit v1.2.3 From 79d5a50477ed74940484a5ca046dfa04adce1550 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 19:01:25 +0200 Subject: empty array should not become null --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index e6f8006..c5c1179 100644 --- a/it.class +++ b/it.class @@ -430,7 +430,7 @@ static function any2utf8($value, $errprefix = "") { foreach ($value as $idx => $v) $newarr[self::any2utf8($idx)] = is_string($v) || is_array($v) ? self::any2utf8($v, $errprefix) : $v; - $value = $newarr; + $value = (array)$newarr; } else if (is_string($value)) { -- cgit v1.2.3