]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_5_0'.
authorSVN Migration <svn@php.net>
Tue, 11 Jan 2005 21:57:02 +0000 (21:57 +0000)
committerSVN Migration <svn@php.net>
Tue, 11 Jan 2005 21:57:02 +0000 (21:57 +0000)
Zend/tests/bug31098.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug31098.phpt b/Zend/tests/bug31098.phpt
new file mode 100644 (file)
index 0000000..8b3c1fc
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+Bug #31098 (isset() / empty() incorrectly returns true in dereference of a wrong type)
+--FILE--
+<?php
+$a = '';
+var_dump(isset($a->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)
+