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
*/
$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) {
......
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