summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71841.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug71841.phpt')
-rw-r--r--Zend/tests/bug71841.phpt32
1 files changed, 21 insertions, 11 deletions
diff --git a/Zend/tests/bug71841.phpt b/Zend/tests/bug71841.phpt
index f66761b3c9..35b805a2a7 100644
--- a/Zend/tests/bug71841.phpt
+++ b/Zend/tests/bug71841.phpt
@@ -1,23 +1,33 @@
--TEST--
Bug #71841 (EG(error_zval) is not handled well)
---INI--
-error_reporting=0
--FILE--
<?php
$z = unserialize('O:1:"A":0:{}');
-var_dump($z->e.=0);
-var_dump(++$z->x);
-var_dump($z->y++);
+@var_dump($z->e.=0);
+@var_dump(++$z->x);
+@var_dump($z->y++);
$y = array(PHP_INT_MAX => 0);
-var_dump($y[] .= 0);
-var_dump(++$y[]);
-var_dump($y[]++);
+try {
+ var_dump($y[] .= 0);
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump(++$y[]);
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($y[]++);
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
?>
--EXPECT--
NULL
NULL
NULL
-NULL
-NULL
-NULL
+Cannot add element to the array as the next element is already occupied
+Cannot add element to the array as the next element is already occupied
+Cannot add element to the array as the next element is already occupied