summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-11-10 20:44:50 +0000
committerMarcus Boerger <helly@php.net>2003-11-10 20:44:50 +0000
commite7365f316c3234fe6d261a8fd106747dc781badc (patch)
tree39217cd4aa51c308b2cf54a4c7985a047d468da2 /Zend
parentbfb73676dee0abeb8bbb02311ecf70383810a1bb (diff)
downloadphp-git-e7365f316c3234fe6d261a8fd106747dc781badc.tar.gz
Correct default handlers
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_object_handlers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index c68552cb5f..e0f3e4e145 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -386,9 +386,10 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSR
}
-static void zend_std_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC)
+static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC)
{
zend_error(E_ERROR, "Cannot use object as array");
+ return 0;
}
@@ -883,7 +884,8 @@ int zend_std_cast_object(zval *readobj, zval *writeobj, int type, int should_fre
MAKE_STD_ZVAL(retval);
ZVAL_STRINGL(retval, empty_string, 0, 0);
}
- REPLACE_ZVAL_VALUE(&writeobj, retval, 0);
+ REPLACE_ZVAL_VALUE(&writeobj, retval, 1);
+ zval_ptr_dtor(&retval);
return SUCCESS;
}
break;