Commit 5e4a0073 authored by Ad Schellevis's avatar Ad Schellevis

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

parent a35211fd
...@@ -542,13 +542,11 @@ class SystemhealthController extends ApiControllerBase ...@@ -542,13 +542,11 @@ class SystemhealthController extends ApiControllerBase
*/ */
$rrd_details=$this->getRRDdetails($rrd)["data"]; $rrd_details=$this->getRRDdetails($rrd)["data"];
$xml = false;
if ($rrd_details['filename'] != "") { if ($rrd_details['filename'] != "") {
$backend = new Backend(); $backend = new Backend();
$response = $backend->configdpRun("systemhealth fetch ", array($rrd_details['filename'])); $response = $backend->configdpRun("systemhealth fetch ", array($rrd_details['filename']));
$xml = simplexml_load_string($response); /* XXX can cause a crash report */ $xml = @simplexml_load_string($response);
} else {
$xml = false;
} }
if ($xml !== false) { if ($xml !== false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment