ganglia / ganglia-web

Ganglia Web Frontend
BSD 3-Clause "New" or "Revised" License
316 stars 168 forks source link

gweb master :: php error [] operator not supported #303

Closed adriansev closed 7 years ago

adriansev commented 8 years ago

Hi! with the latest gweb (and php 7.1.0) i get this :

[Sun Aug 14 21:09:33 2016] [error] [client xxxxx] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/html/ganglia/cluster_view.php:33\nStack trace:\n#0 /var/www/html/ganglia/cluster_view.php(781): get_picker_metrics(Array, Array, '/var/www/html/g...', 'rrdtool')\n#1 {main}\n thrown in /var/www/html/ganglia/cluster_view.php on line 33, referer: http://my_fqdn/ganglia/?r=year&cs=&ce=&m=load_one&s=by+name&c=ISS-ALICE&tab=m&vn=&hide-hf=false

i imagine that this is because of the php version, but can this be solved for any php version? Thank you! Adrian

adriansev commented 7 years ago

so, this was solved by replacing context_metrics = ""; with $context_metrics = array(); can this be implemented? thank you!

vvuksan commented 7 years ago

Can you submit this as a pull request?

adriansev commented 7 years ago

sure, done. thanks!