I definitely saw fixes in 3.0.2, but I don't know if it's all of 'em.

Either way, try the attached patch - a cleanup of the notices you've pasted.

It's pretty trivial, but I didn't test it, so... :-)


Cheers,

Alex



Bernard Li wrote:

> I'm still getting a bunch of PHP Notices in my httpd error_logs:
>
> [client 10.1.1.1] PHP Notice:  Use of undefined constant NAME - assumed
> 'NAME' in /var/www/html/ganglia/ganglia.php on line 166
> [client 10.1.1.1] PHP Notice:  Use of undefined constant HOSTS_UP -
> assumed 'HOSTS_UP' in /var/www/html/ganglia/ganglia.php on line 173
> [client 10.1.1.1] PHP Notice:  Use of undefined constant UP - assumed
> 'UP' in /var/www/html/ganglia/ganglia.php on line 173
> [client 10.1.1.1] PHP Notice:  Use of undefined constant HOSTS_DOWN -
> assumed 'HOSTS_DOWN' in /var/www/html/ganglia/ganglia.php on line 174
> [client 10.1.1.1] PHP Notice:  Undefined variable:  cols_menu in
> /var/www/html/ganglia/cluster_view.php on line 53
>
> I thought these were fixed already?  Or are did the patch go into 3.0.3?
>
> Thanks,
>
> Bernard
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> _______________________________________________
> Ganglia-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
>   
--- ganglia.php 2005-02-03 04:22:48.000000000 +0200
+++ ganglia.php.new     2006-03-24 22:54:08.000000000 +0200
@@ -163,19 +163,19 @@
             preamble($attrs);
             break;
          case "GRID":
-            $self = $attrs[NAME];
+            $self = $attrs['NAME'];
             $grid = $attrs;
          case "CLUSTER":
             $cluster = $attrs;
             break;
          
          case "HOSTS":
-            $cluster[HOSTS_UP] = $attrs[UP];
-            $cluster[HOSTS_DOWN] = $attrs[DOWN];
+            $cluster['HOSTS_UP'] = $attrs['UP'];
+            $cluster['HOSTS_DOWN'] = $attrs['DOWN'];
             break;
             
          case "METRICS":
-            $metrics[$attrs[NAME]] = $attrs;
+            $metrics[$attrs['NAME']] = $attrs;
             break;
             
          default:

Reply via email to