From 52b473dd33154df7d536ad53b5bf0e28627b644c Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 28 Oct 2016 09:09:47 -0700 Subject: [PATCH] Extra debug option for tracking XML issues. --- e107_handlers/xml_class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 7dfb98c9f..2d36fdbdc 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -95,6 +95,12 @@ class parseXml extends xmlClass // BC with v1.x { $error = sprintf('XML error: %s at line %d, column %d', xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser),xml_get_current_column_number($this->parser)); $log->addDebug($error)->save('XML'); + if(e_DEBUG === true) + { + $error .= "\n".$data; + $error .= "\n--------------------------------------------\n\n"; + $log->addDebug($error)->toFile('xmlErrors',"XML Error Log",true); + } return FALSE; } }