(systemhealth) don't generate crash report on empty or invalid rrd xml data

This commit is contained in:
Ad Schellevis 2016-04-11 13:36:20 +02:00
parent a35211fdef
commit 5e4a007307

View File

@ -542,13 +542,11 @@ class SystemhealthController extends ApiControllerBase
*/
$rrd_details=$this->getRRDdetails($rrd)["data"];
$xml = false;
if ($rrd_details['filename'] != "") {
$backend = new Backend();
$response = $backend->configdpRun("systemhealth fetch ", array($rrd_details['filename']));
$xml = simplexml_load_string($response); /* XXX can cause a crash report */
} else {
$xml = false;
$xml = @simplexml_load_string($response);
}
if ($xml !== false) {