Page 1 of 1

serendipity_plugin_weather needs an update?

Posted: Mon Aug 12, 2013 2:23 am
by Noelb
php (5.4) is now not playing very nice with one plugin, it used to on 5.3 spit odd errors but now php is fataling them.

PHP Fatal error: Cannot use object of type PEAR_Error as array in serendipity_plugin_weather/
serendipity_plugin_weather.php on line 196
which is:
$windDir = $weather_data["windDirection"];


Any pointers?

Cheers

Re: serendipity_plugin_weather needs an update?

Posted: Wed Oct 09, 2013 5:30 pm
by Timbalu
I don't really want to dive into this, but if this is still onboard, you could try to cast this as an array after the pear error checks and add

Code: Select all

$weather_data = (array)$weather_data;
here:
https://github.com/s9y/additional_plugi ... r.php#L193

Did you try to upgrade the pear package first?
http://pear.php.net/package/Services_Weather
https://github.com/pear/Services_Weather

There was an update on such an error
http://pear.php.net/bugs/bug.php?id=19228

Re: serendipity_plugin_weather needs an update?

Posted: Thu Oct 10, 2013 1:59 am
by Noelb
Timbalu wrote:I don't really want to dive into this, but if this is still onboard, you could try to cast this as an array after the pear error checks and add

Code: Select all

$weather_data = (array)$weather_data;
here:
https://github.com/s9y/additional_plugi ... r.php#L193

Did you try to upgrade the pear package first?
http://pear.php.net/package/Services_Weather
https://github.com/pear/Services_Weather

There was an update on such an error
http://pear.php.net/bugs/bug.php?id=19228
thanks, I'm trying your code addition and have upgraded services_weather, will see how it goes
cheers