WordPress.org

Ready to get started?Download WordPress

Forums

Simple Google Calendar Widget
[resolved] Fatal error (3 posts)

  1. pwndrian
    Member
    Posted 2 years 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/

  2. larcher
    Member
    Posted 1 year 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)

  3. nboehr
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you guys for reporting. I fixed this problem in version 0.3.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic