Commit 9d97d54a authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

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

(cherry picked from commit 5e4a0073)
parent 1a30913f
...@@ -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); $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