mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
parent
4eee81b509
commit
0a39890c96
2 changed files with 11 additions and 5 deletions
|
@ -472,7 +472,11 @@ static void _php_libxml_free_error(void *ptr)
|
||||||
xmlResetError((xmlErrorPtr) ptr);
|
xmlResetError((xmlErrorPtr) ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg)
|
#if LIBXML_VERSION >= 21200
|
||||||
|
static void _php_list_set_error_structure(const xmlError *error, const char *msg)
|
||||||
|
#else
|
||||||
|
static void _php_list_set_error_structure(xmlError *error, const char *msg)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
xmlError error_copy;
|
xmlError error_copy;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -725,7 +729,11 @@ PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBXML_VERSION >= 21200
|
||||||
|
PHP_LIBXML_API void php_libxml_structured_error_handler(void *userData, const xmlError *error)
|
||||||
|
#else
|
||||||
PHP_LIBXML_API void php_libxml_structured_error_handler(void *userData, xmlErrorPtr error)
|
PHP_LIBXML_API void php_libxml_structured_error_handler(void *userData, xmlErrorPtr error)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
_php_list_set_error_structure(error, NULL);
|
_php_list_set_error_structure(error, NULL);
|
||||||
|
|
||||||
|
@ -957,11 +965,9 @@ PHP_FUNCTION(libxml_use_internal_errors)
|
||||||
/* {{{ Retrieve last error from libxml */
|
/* {{{ Retrieve last error from libxml */
|
||||||
PHP_FUNCTION(libxml_get_last_error)
|
PHP_FUNCTION(libxml_get_last_error)
|
||||||
{
|
{
|
||||||
xmlErrorPtr error;
|
|
||||||
|
|
||||||
ZEND_PARSE_PARAMETERS_NONE();
|
ZEND_PARSE_PARAMETERS_NONE();
|
||||||
|
|
||||||
error = xmlGetLastError();
|
const xmlError *error = xmlGetLastError();
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
object_init_ex(return_value, libxmlerror_class_entry);
|
object_init_ex(return_value, libxmlerror_class_entry);
|
||||||
|
|
|
@ -332,7 +332,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
|
||||||
sdl_restore_uri_credentials(ctx);
|
sdl_restore_uri_credentials(ctx);
|
||||||
|
|
||||||
if (!wsdl) {
|
if (!wsdl) {
|
||||||
xmlErrorPtr xmlErrorPtr = xmlGetLastError();
|
const xmlError *xmlErrorPtr = xmlGetLastError();
|
||||||
|
|
||||||
if (xmlErrorPtr) {
|
if (xmlErrorPtr) {
|
||||||
soap_error2(E_ERROR, "Parsing WSDL: Couldn't load from '%s' : %s", struri, xmlErrorPtr->message);
|
soap_error2(E_ERROR, "Parsing WSDL: Couldn't load from '%s' : %s", struri, xmlErrorPtr->message);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue