Fix PHP warnings

This commit is contained in:
Manuel Kasper 2014-11-18 13:19:11 +01:00
parent cec7cf2de0
commit 51bda95d72
2 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ if ($vertical_label) {
$cmd .= "--vertical-label '<- OUT | IN ->' ";
}
if($showtitledetail && $_GET['dname'] != "")
if($showtitledetail && @$_GET['dname'] != "")
$cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
else
if (isset($_GET['v']) && is_numeric($_GET['v']))

View File

@ -65,9 +65,9 @@ header("Content-Type: image/png");
$width = $default_graph_width;
$height = $default_graph_height;
if ($_GET['width'])
if (@$_GET['width'])
$width = (int)$_GET['width'];
if ($_GET['height'])
if (@$_GET['height'])
$height = (int)$_GET['height'];
$knownlinks = getknownlinks();
@ -89,7 +89,7 @@ $cmd = "$rrdtool graph - " .
if (!$compat_rrdtool12)
$cmd .= "--full-size-mode ";
if($showtitledetail && $_GET['dname'] != "")
if($showtitledetail && @$_GET['dname'] != "")
$cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
else
if (isset($_GET['v']) && is_numeric($_GET['v']))