File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1413,14 +1413,10 @@ PHP_METHOD(SimpleXMLElement, asXML)
14131413
14141414static inline void sxe_add_namespace_name_raw (zval * return_value , const char * prefix , const char * href )
14151415{
1416- zend_string * key = zend_string_init (prefix , strlen (prefix ), 0 );
1417- zval zv ;
1418-
1419- if (!zend_hash_exists (Z_ARRVAL_P (return_value ), key )) {
1420- ZVAL_STRING (& zv , href );
1421- zend_hash_add_new (Z_ARRVAL_P (return_value ), key , & zv );
1416+ zval * zv = zend_hash_str_lookup (Z_ARRVAL_P (return_value ), prefix , strlen (prefix ));
1417+ if (Z_ISNULL_P (zv )) {
1418+ ZVAL_STRING (zv , href );
14221419 }
1423- zend_string_release_ex (key , 0 );
14241420}
14251421
14261422static inline void sxe_add_namespace_name (zval * return_value , xmlNsPtr ns ) /* {{{ */
You can’t perform that action at this time.
0 commit comments