summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-03-17 19:13:46 +0000
committerAndi Gutmans <andi@php.net>2002-03-17 19:13:46 +0000
commit46afe61d25f11d1b7a3678b2d6cf3b90ce475029 (patch)
tree90c3ca1cb638c5db8b7969a5b56e47bed72366eb /Zend/zend_compile.c
parentd568b5c87b95628e594ecf07411d05a9dd8ff909 (diff)
downloadphp-git-46afe61d25f11d1b7a3678b2d6cf3b90ce475029.tar.gz
- Start putting error handling where method calls are being used in a
- context where only writable variables should be used.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 674aa0c429..6ff52c25ff 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2434,6 +2434,8 @@ void zend_do_add_list_element(znode *element TSRMLS_DC)
list_llist_element lle;
if (element) {
+ zend_check_writable_variable(element);
+
lle.var = *element;
zend_llist_copy(&lle.dimensions, &CG(dimension_llist));
zend_llist_prepend_element(&CG(list_llist), &lle);
@@ -2624,6 +2626,8 @@ void zend_do_unset(znode *variable, int type TSRMLS_DC)
{
zend_op *last_op;
+ zend_check_writable_variable(variable);
+
last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1];
switch (last_op->opcode) {
@@ -2646,10 +2650,8 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
zend_do_end_variable_parse(BP_VAR_IS, 0 TSRMLS_CC);
- /* Check what to do with this later on when adding all of the check writable stuff
- * zend_check_writable_variable(variable);
- */
-
+ zend_check_writable_variable(variable);
+
last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1];
switch (last_op->opcode) {