com php-src: Use zend_call_method in SoapFault::_ _toString(): ext/soap/soap.c
| From: | Nikita Popov | Date: | Thu, 23 Jul 2020 14:45:53 +0000 |
| Subject: | com php-src: Use zend_call_method in SoapFault::_ _toString(): ext/soap/soap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112347@lists.php.net to get a copy of this message | ||
Commit: 86882060ab46345d0cb5992d21697a2b5ad11d02
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 23 Jul 2020 16:45:53 +0200
Parents: a1ab7bbc3a4cdafa73264ac428ddd3af7217c8a3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=86882060ab46345d0cb5992d21697a2b5ad11d02
Log:
Use zend_call_method in SoapFault::__toString()
Changed paths:
M ext/soap/soap.c
Diff:
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 9b12cea48a..af9b26161f 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -25,6 +25,7 @@
#endif
#include "soap_arginfo.h"
#include "zend_exceptions.h"
+#include "zend_interfaces.h"
static int le_sdl = 0;
@@ -633,7 +634,6 @@ PHP_METHOD(SoapFault, __toString)
{
zval *faultcode, *faultstring, *file, *line, trace, rv1, rv2, rv3, rv4;
zend_string *str;
- zend_fcall_info fci;
zval *this_ptr;
zend_string *faultcode_val, *faultstring_val, *file_val;
zend_long line_val;
@@ -648,16 +648,8 @@ PHP_METHOD(SoapFault, __toString)
file = zend_read_property(soap_fault_class_entry, this_ptr, "file",
sizeof("file")-1, 1, &rv3);
line = zend_read_property(soap_fault_class_entry, this_ptr, "line",
sizeof("line")-1, 1, &rv4);
- fci.size = sizeof(fci);
- ZVAL_STRINGL(&fci.function_name, "gettraceasstring",
sizeof("gettraceasstring")-1);
- fci.object = Z_OBJ_P(ZEND_THIS);
- fci.retval = &trace;
- fci.param_count = 0;
- fci.params = NULL;
-
- zend_call_function(&fci, NULL);
-
- zval_ptr_dtor(&fci.function_name);
+ zend_call_method_with_0_params(
+ Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), NULL, "gettraceasstring", &trace);
faultcode_val = zval_get_string(faultcode);
faultstring_val = zval_get_string(faultstring);