# HG changeset patch # User Pascal Bellard # Date 1342435587 -7200 # Node ID 1f255fd08adfddcfb03bc9beb5c220944679ff2f # Parent c6801d066386b840014c1f979bfa5e492af4b43f graphs.php: avoid an undefined index diff -r c6801d066386 -r 1f255fd08adf chub/web/graphs.php --- a/chub/web/graphs.php Sun Jul 15 14:20:00 2012 +0200 +++ b/chub/web/graphs.php Mon Jul 16 12:46:27 2012 +0200 @@ -60,7 +60,7 @@ echo "\n"; one_graphic($img."-day.png",$res." daily"); echo ""; - if ($_GET['stats'] == $res) { + if (isset($_GET['stats']) && $_GET['stats'] == $res) { one_graphic($img."-week.png",$res." weekly"); one_graphic($img."-month.png",$res." monthly"); one_graphic($img."-year.png",$res." yearly"); diff -r c6801d066386 -r 1f255fd08adf mirror/info/graphs.php --- a/mirror/info/graphs.php Sun Jul 15 14:20:00 2012 +0200 +++ b/mirror/info/graphs.php Mon Jul 16 12:46:27 2012 +0200 @@ -95,7 +95,7 @@ echo "\n"; one_graphic($img."-day.png",$res." daily"); echo ""; - if ($_GET['stats'] == $res) { + if (isset($_GET['stats']) && $_GET['stats'] == $res) { one_graphic($img."-week.png",$res." weekly"); one_graphic($img."-month.png",$res." monthly"); one_graphic($img."-year.png",$res." yearly"); diff -r c6801d066386 -r 1f255fd08adf tank/web/graphs.php --- a/tank/web/graphs.php Sun Jul 15 14:20:00 2012 +0200 +++ b/tank/web/graphs.php Mon Jul 16 12:46:27 2012 +0200 @@ -68,7 +68,7 @@ echo "\n"; one_graphic($img."-day.png",$res." daily"); echo ""; - if ($_GET['stats'] == $res) { + if (isset($_GET['stats']) && $_GET['stats'] == $res) { one_graphic($img."-week.png",$res." weekly"); one_graphic($img."-month.png",$res." monthly"); one_graphic($img."-year.png",$res." yearly");