[Fusionforge-commits] r14693 - trunk/src/www/include

Alain Peyrat aljeux at fusionforge.org
Mon Oct 24 14:00:13 CEST 2011


Author: aljeux
Date: 2011-10-24 14:00:12 +0200 (Mon, 24 Oct 2011)
New Revision: 14693

Modified:
   trunk/src/www/include/HTML_Graphs.php
Log:
Fix PHP warnings on undefined variable

Modified: trunk/src/www/include/HTML_Graphs.php
===================================================================
--- trunk/src/www/include/HTML_Graphs.php	2011-10-24 11:54:59 UTC (rev 14692)
+++ trunk/src/www/include/HTML_Graphs.php	2011-10-24 12:00:12 UTC (rev 14693)
@@ -421,19 +421,19 @@
 */
 function hv_graph_defaults($vals)
    {
-    if (! $vals["vfcolor"]) { $vals["vfcolor"]="#000000"; }
-    if (! $vals["hfcolor"]) { $vals["hfcolor"]="#000000"; }
-    if (! $vals["vbgcolor"]) { $vals["vbgcolor"]="#ffffff"; }
-    if (! $vals["hbgcolor"]) { $vals["hbgcolor"]="#ffffff"; }
-    if (! $vals["cellpadding"]) { $vals["cellpadding"]=0; }
-    if (! $vals["cellspacing"]) { $vals["cellspacing"]=0; }
-    if (! $vals["border"]) { $vals["border"]=0; }
-    if (! $vals["scale"]) { $vals["scale"]=1; }
-    if (! $vals["namebgcolor"]) { $vals["namebgcolor"]="#ffffff"; }
-    if (! $vals["valuebgcolor"]) { $vals["valuebgcolor"]="#ffffff"; }
-    if (! $vals["namefcolor"]) { $vals["namefcolor"]="#000000"; }
-    if (! $vals["valuefcolor"]) { $vals["valuefcolor"]="#000000"; }
-    if (! $vals["doublefcolor"]) { $vals["doublefcolor"]="#886666"; }
+    if (!isset($vals["vfcolor"]))      { $vals["vfcolor"]="#000000"; }
+    if (!isset($vals["hfcolor"]))      { $vals["hfcolor"]="#000000"; }
+    if (!isset($vals["vbgcolor"]))     { $vals["vbgcolor"]="#ffffff"; }
+    if (!isset($vals["hbgcolor"]))     { $vals["hbgcolor"]="#ffffff"; }
+    if (!isset($vals["cellpadding"]))  { $vals["cellpadding"]=0; }
+    if (!isset($vals["cellspacing"]))  { $vals["cellspacing"]=0; }
+    if (!isset($vals["border"]))       { $vals["border"]=0; }
+    if (!isset($vals["scale"]))        { $vals["scale"]=1; }
+    if (!isset($vals["namebgcolor"]))  { $vals["namebgcolor"]="#ffffff"; }
+    if (!isset($vals["valuebgcolor"])) { $vals["valuebgcolor"]="#ffffff"; }
+    if (!isset($vals["namefcolor"]))   { $vals["namefcolor"]="#000000"; }
+    if (!isset($vals["valuefcolor"]))  { $vals["valuefcolor"]="#000000"; }
+    if (!isset($vals["doublefcolor"])) { $vals["doublefcolor"]="#886666"; }
 
     return ($vals);
    }




More information about the Fusionforge-commits mailing list