File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,6 @@ static zend_result php_dom_xpath_callback_dispatch(php_dom_xpath_callbacks *xpat
435435 if (xpath_callbacks -> node_list == NULL ) {
436436 xpath_callbacks -> node_list = zend_new_array (0 );
437437 }
438- Z_ADDREF_P (& callback_retval );
439438 zend_hash_next_index_insert_new (xpath_callbacks -> node_list , & callback_retval );
440439 obj = Z_DOMOBJ_P (& callback_retval );
441440 nodep = dom_object_get_node (obj );
@@ -447,12 +446,10 @@ static zend_result php_dom_xpath_callback_dispatch(php_dom_xpath_callbacks *xpat
447446 zval_ptr_dtor (& callback_retval );
448447 return FAILURE ;
449448 } else {
450- zend_string * tmp_str ;
451- zend_string * str = zval_get_tmp_string (& callback_retval , & tmp_str );
452- valuePush (ctxt , xmlXPathNewString (BAD_CAST ZSTR_VAL (str )));
453- zend_tmp_string_release (tmp_str );
449+ convert_to_string (& callback_retval );
450+ valuePush (ctxt , xmlXPathNewString (BAD_CAST Z_STRVAL (callback_retval )));
451+ zval_ptr_dtor_str (& callback_retval );
454452 }
455- zval_ptr_dtor (& callback_retval );
456453 }
457454
458455 return SUCCESS ;
You can’t perform that action at this time.
0 commit comments