WordPress.org

Ready to get started?Download WordPress

Forums

RSS Digest
Fatal error: Call to a member function get_date() on a non-object (2 posts)

  1. sephage
    Member
    Posted 2 years ago #

    I'm getting the following error on RSS Digest, despite not having changed anything recently:

    Fatal error: Call to a member function get_date() on a non-object in /wp-content/plugins/rss-digest/rss-digest.php on line 613

    Here's the line of code that is triggering the error:
    $item_date = $item->get_date('l ' . get_option('date_format', 'F j, Y') . ', ' . get_option('time_format', 'H:m p'));

    Any ideas?

    Thanks!

    http://wordpress.org/extend/plugins/rss-digest/

  2. Vlad Lasky
    Member
    Posted 2 years ago #

    I am not sure what is causing your problem, but I have only seen this when using an empty RSS feed. I have made my own bug fix to rss-digest.php to correct this.

    From line 603 in the latest official version, I replaced

    try {
        $rss = scrd_initialize_feed($feed_url);
        $item = $rss->get_item();
        $item_date = $item->get_date('l ' . get_option('date_format', 'F j, Y') . '$
        $feed_title = $rss->get_title();
        $feed_quantity = $rss->get_item_quantity();
      }

    with

    try {
        $rss = scrd_initialize_feed($feed_url);
        $feed_quantity = $rss->get_item_quantity();
        if ($feed_quantity > 0)
        {
                $item = $rss->get_item();
                $item_date = $item->get_date('l ' . get_option('date_format', 'F j, Y') . ', ' . get_option('time$
                $feed_title = $rss->get_title();
        }
      }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags