From 7af33a75ababa2e26a37d7db774d68e215542a8c Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 30 Nov 2010 10:37:38 -0500 Subject: Print file name when logging an xml error. --- etc/inc/xmlparse.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc/inc/xmlparse.inc') diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc index 9f44e21..75871a9 100644 --- a/etc/inc/xmlparse.inc +++ b/etc/inc/xmlparse.inc @@ -179,9 +179,10 @@ function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") { while ($data = fread($fp, 4096)) { if (!xml_parse($xml_parser, $data, feof($fp))) { - log_error(sprintf("XML error: %s at line %d\n", + log_error(sprintf("XML error: %s at line %d in %s\n", xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); + xml_get_current_line_number($xml_parser), + $cffile)); return -1; } } -- cgit v1.1