slitaz-forge diff tank/web/graphs.php @ rev 319

graphs.php: avoid an undefined index
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 16 12:46:27 2012 +0200 (2012-07-16)
parents 602839559efc
children c70b14e7ce7d
line diff
     1.1 --- a/tank/web/graphs.php	Tue Apr 17 21:17:12 2012 +0000
     1.2 +++ b/tank/web/graphs.php	Mon Jul 16 12:46:27 2012 +0200
     1.3 @@ -68,7 +68,7 @@
     1.4  	echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
     1.5  	one_graphic($img."-day.png",$res." daily");
     1.6  	echo "</a>";
     1.7 -	if ($_GET['stats'] == $res) {
     1.8 +	if (isset($_GET['stats']) && $_GET['stats'] == $res) {
     1.9  		one_graphic($img."-week.png",$res." weekly");
    1.10  		one_graphic($img."-month.png",$res." monthly");
    1.11  		one_graphic($img."-year.png",$res." yearly");