Web: enclose PHP error messages in CDATA

We don't know what the PHP error message contains so we enclose it in a CDATA block so the response is still valid XML and can be parsed using standard tools.
This commit is contained in:
Christian Beer 2016-08-04 13:08:19 +02:00
parent b403e6dddc
commit 3b3c575694
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ function error_handler($errno, $errstr, $errfile, $errline) {
if ($errno == E_WARNING) $errno = "Warning";
if ($errno == E_NOTICE) $errno = "Notice";
echo "<error>
<error_msg>$errstr</error_msg>
<error_msg><![CDATA[$errstr]]></error_msg>
<type>$errno</type>
<file>$errfile</file>
<line>$errline</line>