From 18b7d9311cec0a8d93524dcac2a20bd1b9a30466 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 16 Feb 2021 11:39:38 -0700 Subject: [PATCH] Revert "throw an exception on XML errors in eTemplates for easier fixing" This reverts commit 81b4737710f7735c34f3c997a4ca94ba26a602ac. --- api/src/Etemplate/Widget.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/src/Etemplate/Widget.php b/api/src/Etemplate/Widget.php index 5b009ff403..aded33c84f 100644 --- a/api/src/Etemplate/Widget.php +++ b/api/src/Etemplate/Widget.php @@ -123,7 +123,7 @@ class Widget // read all attributes $this->set_attrs($reader); - while(($ok=$reader->read()) && $reader->depth > $depth) + while($reader->read() && $reader->depth > $depth) { if ($reader->nodeType == XMLReader::ELEMENT && $reader->depth > $depth) { @@ -135,12 +135,6 @@ class Widget $this->attrs[(string)$reader->name] = (string)$reader->value; } } - // give a clear indication where the template error is - if (!$ok && ($error = libxml_get_last_error())) - { - $file = str_replace([EGW_SERVER_ROOT.'/', '//default/etemplates/'], '', $error->file); - throw new \Exception("Error passing XML file '$file' line $error->line: $error->message"); - } // Reset content as we leave if($old_cont) { @@ -162,7 +156,6 @@ class Widget } else { - libxml_use_internal_errors(true); $reader = new XMLReader(); if (!$reader->XML($xml)) {