-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Good day.
I found a syntax error in WeatherMapDataSource_zabbix.php, line 50.
When trying to run ./weathermap with included zabbix datasource plugin it returns:
PHP Parse error: syntax error, unexpected '[' in /tmp/weathermap/lib/datasources/WeatherMapDataSource_zabbix.php on line 50
$in_value = $this->zabbixApi->getItemLastValue($host,$zabbix_key, $in)['lastvalue'];
$raw_out_value = $this->zabbixApi->getItemLastValue($host, $zabbix_key, $out);
$out_value = $raw_out_value["lastvalue"];
Looks like it was fixed for out_value, but not for in.
Worked variant:
$in_value = $this->zabbixApi->getItemLastValue($host,$zabbix_key, $in)['lastvalue'];
$raw_out_value = $this->zabbixApi->getItemLastValue($host, $zabbix_key, $out);
$raw_in_value = $this->zabbixApi->getItemLastValue($host, $zabbix_key, $in);
$in_value = $raw_in_value["lastvalue"];
$out_value = $raw_out_value["lastvalue"];
$data_time = $raw_out_value["lastclock"];