mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Etemplate: Better error message for parse errors in xml strings (not files)
This happens in things like Transformer, where we generate some XML for parsing
(cherry picked from commit 7cf7c5a638
)
This commit is contained in:
parent
7ce92b9124
commit
6ef766edf0
@ -139,6 +139,10 @@ class Widget
|
|||||||
if (!$ok && ($error = libxml_get_last_error()))
|
if (!$ok && ($error = libxml_get_last_error()))
|
||||||
{
|
{
|
||||||
$file = str_replace([EGW_SERVER_ROOT.'/', '//default/etemplates/'], '', $error->file);
|
$file = str_replace([EGW_SERVER_ROOT.'/', '//default/etemplates/'], '', $error->file);
|
||||||
|
if(!$file && is_string($xml))
|
||||||
|
{
|
||||||
|
$file = $xml;
|
||||||
|
}
|
||||||
throw new \Exception("Error passing XML file '$file' line $error->line: $error->message");
|
throw new \Exception("Error passing XML file '$file' line $error->line: $error->message");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user