From: SVN Migration Date: Tue, 11 Jan 2005 21:57:02 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. X-Git-Tag: php-5.0.4RC1~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6634ee0145abb1058519d8d75bcf0c03ae6f2fc1;p=php This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. --- diff --git a/Zend/tests/bug31098.phpt b/Zend/tests/bug31098.phpt new file mode 100644 index 0000000000..8b3c1fc5ea --- /dev/null +++ b/Zend/tests/bug31098.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #31098 (isset() / empty() incorrectly returns true in dereference of a wrong type) +--FILE-- +b)); +$a = 'a'; +var_dump(isset($a->b)); +$a = '0'; +var_dump(isset($a->b)); +$a = ''; +var_dump(isset($a{'b'})); +$a = 'a'; +var_dump(isset($a{'b'})); +$a = '0'; +var_dump(isset($a{'b'})); +?> +--EXPECTF-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +