From e0347ab2c4ffa9d27e1bed1402c1ac16a5bcf58b Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Fri, 4 Jul 2003 22:21:23 +0000 Subject: [PATCH] "real" fix --- ext/simplexml/simplexml.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index af2982f721..f51e511a44 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -719,10 +719,7 @@ static void cast_object(zval *object, int type, char *contents TSRMLS_DC) { if (contents) { - int len = strlen(contents); - ZVAL_STRINGL(object, contents, len, 1); - } else { - ZVAL_NULL(object); + ZVAL_STRINGL(object, contents, strlen(contents), 1); } switch (type) { @@ -751,7 +748,6 @@ sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_ char *contents = NULL; sxe = php_sxe_fetch_object(readobj TSRMLS_CC); - if (should_free) { zval_dtor(writeobj); } -- 2.50.1