From: Aaron Hamid Date: Mon, 18 Nov 2013 03:59:42 +0000 (-0500) Subject: added a test to cover distinction between boolean return value of unserialize functio... X-Git-Tag: php-5.4.23RC1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=050dd59c639d2c742042bc884021fc3d0fca0c7b;p=php added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean --- diff --git a/ext/standard/tests/serialize/serialization_error_002.phpt b/ext/standard/tests/serialize/serialization_error_002.phpt new file mode 100644 index 0000000000..6525aaaf43 --- /dev/null +++ b/ext/standard/tests/serialize/serialization_error_002.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test unserialize(): error is indistinguishable from deserialized boolean +--FILE-- + +--EXPECTF-- +*** Testing unserialize() error/boolean distinction *** +string(4) "b:0;" + +Notice: unserialize(): Error at offset 0 of 27 bytes in %s/serialization_error_002.php on line 20 +bool(false) +bool(false) +unserialize error and deserialized false are identical? 1 +bool(false) +bool(true) +Done