serendipity_plugin_weather needs an update?

Creating and modifying plugins.
Post Reply
Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

serendipity_plugin_weather needs an update?

Post by Noelb » Mon Aug 12, 2013 2:23 am

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

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: serendipity_plugin_weather needs an update?

Post by Timbalu » Wed Oct 09, 2013 5:30 pm

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
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Re: serendipity_plugin_weather needs an update?

Post by Noelb » Thu Oct 10, 2013 1:59 am

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

Post Reply