cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h /tests foreach_unset_globals.phpt
"Antony Dovgal" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvstony20011218403401@cvsserver> |
tony2001 Sun Aug 10 21:23:21 2008 UTC
Added files:
/ZendEngine2/tests foreach_unset_globals.phpt
Modified files:
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
fix bug reported by Henrique
add test
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.240&r2=1.241&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.240 ZendEngine2/zend_vm_def.h:1.241
--- ZendEngine2/zend_vm_def.h:1.240 Fri Aug 8 17:10:49 2008
+++ ZendEngine2/zend_vm_def.h Sun Aug 10 21:23:20 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.240 2008/08/08 17:10:49 helly Exp $ */
+/* $Id: zend_vm_def.h,v 1.241 2008/08/10 21:23:20 tony2001 Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -3554,7 +3554,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) {
+ }
+
+ if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) {
Z_ADDREF_P(offset);
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.244&r2=1.245&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.244 ZendEngine2/zend_vm_execute.h:1.245
--- ZendEngine2/zend_vm_execute.h:1.244 Fri Aug 8 17:10:49 2008
+++ ZendEngine2/zend_vm_execute.h Sun Aug 10 21:23:20 2008
@@ -11078,7 +11078,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -12920,7 +12922,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -14809,7 +14813,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -17314,7 +17320,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -18594,7 +18602,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -19724,7 +19734,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -20854,7 +20866,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -22252,7 +22266,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -25394,7 +25410,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -27114,7 +27132,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -28880,7 +28900,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
@@ -31150,7 +31172,9 @@
offset_len = norm_len;
free_offset = 1;
}
- } else if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/foreach_unset_globals.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/foreach_unset_globals.phpt
+++ ZendEngine2/tests/foreach_unset_globals.phpt
--TEST--
traverse an array and use its keys to unset GLOBALS
--FILE--
<?php
$arr = array("a" => 1, "b" => 2);
foreach ($arr as $key => $val) {
unset($GLOBALS[$key]);
}
var_dump($arr);
echo "Done\n";
?>
--EXPECTF--
array(2) {
[u"a"]=>
int(1)
[u"b"]=>
int(2)
}
Done
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php