]> granicus.if.org Git - php/commitdiff
Correct default handlers
authorMarcus Boerger <helly@php.net>
Mon, 10 Nov 2003 20:44:50 +0000 (20:44 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 10 Nov 2003 20:44:50 +0000 (20:44 +0000)
Zend/zend_object_handlers.c

index c68552cb5f2d152d23356ba714d3dc74e2ba51c0..e0f3e4e145a99b1ec18e75f772a1b7bf2c46ac98 100644 (file)
@@ -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;