pwndrian
Member
Posted 1 year ago #
The following error appears, when adding the widget to my site:
Fatal error: Cannot use object of type WP_Error as array in [...]\wp-content\plugins\simple-google-calendar-widget\simple_gcal.php on line 77
http://wordpress.org/extend/plugins/simple-google-calendar-widget/
larcher
Member
Posted 7 months ago #
I ran into this too. wp_remote_get() returns a WP_Error if the HTTP request fails. (In my case, the server firewall was blocking the request, and it timed out.)
I fixed it by changing line 74 of simple_gcal.php from this
if(!$httpData)
to this
if(!$httpData || !is_array($httpData))
(Make sure wp_remote_get() returns actual data, in an array)
nboehr
Member
Plugin Author
Posted 7 months ago #
Thank you guys for reporting. I fixed this problem in version 0.3.