From 6531cbd1d286738acb9448b141bf4d7d5f97ccf3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 9 Aug 2017 17:35:03 -0700 Subject: libxml errors --- include/network.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index fa49e5765..cd6e980ff 100644 --- a/include/network.php +++ b/include/network.php @@ -671,11 +671,12 @@ function parse_xml_string($s,$strict = true) { libxml_use_internal_errors(true); $x = @simplexml_load_string($s2); - if(! $x) { + if($x === false) { logger('libxml: parse: error: ' . $s2, LOGGER_DATA); - foreach(libxml_get_errors() as $err) - logger('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, LOGGER_DATA); - + foreach(libxml_get_errors() as $err) { + logger('libxml: parse: ' . $err->code . ' at ' . $err->line + . ':' . $err->column . ' : ' . $err->message, LOGGER_DATA); + } libxml_clear_errors(); } -- cgit v1.2.3