diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index a00b152f9c0..7f801f2fdd6 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -268,7 +268,7 @@ long_dim: } } - ZVAL_UNDEF(rv); + ZVAL_NULL(rv); if (node) { if (attribs) { @@ -338,10 +338,6 @@ long_dim: zval_ptr_dtor_str(&tmp_zv); } - if (Z_ISUNDEF_P(rv)) { - ZVAL_NULL(rv); - } - return rv; } /* }}} */