diff options
Diffstat (limited to 'ext/json/tests/bug42090.phpt')
-rw-r--r-- | ext/json/tests/bug42090.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/json/tests/bug42090.phpt b/ext/json/tests/bug42090.phpt new file mode 100644 index 0000000..9e5b331 --- /dev/null +++ b/ext/json/tests/bug42090.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #42090 (json_decode causes segmentation fault) +--SKIPIF-- +<?php if (!extension_loaded("json")) print "skip"; ?> +--FILE-- +<?php +var_dump( + json_decode('""'), + json_decode('"..".'), + json_decode('"'), + json_decode('""""'), + json_encode('"'), + json_decode(json_encode('"')), + json_decode(json_encode('""')) +); +?> +--EXPECT-- +string(0) "" +NULL +NULL +NULL +string(4) ""\""" +string(1) """ +string(2) """" |