howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
426 stars 94 forks source link

Uncaught Error: Call to private method WeatherMapConfigReader::readConfigFile() #105

Closed pautiina closed 7 years ago

pautiina commented 7 years ago

Hello. I have update the last weathermap plugin from branch database-refactor and on cacti.log have this error:

2017/06/06 20:22:14 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught Error: Call to private method WeatherMapConfigReader::readConfigFile() from context 'WeatherMap' in /var/www/cacti/plugins/weathermap/lib/Weathermap.class.php:547
Stack trace:
#0 /var/www/cacti/plugins/weathermap/lib/poller-common.php(211): WeatherMap->ReadConfig('/var/www/cacti/...')
#1 /var/www/cacti/plugins/weathermap/lib/cacti-plugin-poller.php(158): weathermap_run_maps('/var/www/cacti/...')
#2 /var/www/cacti/lib/plugins.php(162): weathermap_poller_bottom(Array)
#3 /var/www/cacti/lib/plugins.php(69): api_plugin_run_plugin_hook('poller_bottom', 'weathermap', 'weathermap_poll...', Array)
#4 /var/www/cacti/poller.php(716): api_plugin_hook('poller_bottom')
#5 {main}
  thrown in file: /var/www/cacti/plugins/weathermap/lib/Weathermap.class.php on line: 547

I use the latest version of cacti 1.1.9.

howardjones commented 7 years ago

Yes, this is fixed in my offline copy already, but that also includes a lot of half-finished stuff (I just rewrote the cacti plugin), so I'll need to commit just this file.

howardjones commented 7 years ago

Yes, this is fixed in my offline copy already, but that also includes a lot of half-finished stuff (I just rewrote the cacti plugin) and I don't think I can push a single file from a single commit.

So for now, change line 1156 of lib/WeatherMapConfigReader.class.php so that it says public instead of private at the beginning.

I'll leave this open until I get to the point I can push the fix to github.

pautiina commented 7 years ago

Thanks for answer.

pautiina commented 7 years ago

Hello. After pull from database-refactor branch I dont have this error. Maybe close issue?

laf commented 7 years ago

If the change in the file mentioned above is in the latest version then I'd say so yes.

howardjones commented 7 years ago

Apologies! There was a month-long period away from a computer in July, and I forgot about this when I finally decided to commit the half-completed stuff anyway.