Support » Fixing WordPress » Google Analytics for WordPress – Fatal error message

  • Resolved naturalgrace



    I’ve tried to install Google Analytics for Wordprss and got the error message below. I’ve no idea what it means or how to rectify it. I am not code literate so please sxplain it simply for me. I’ve looked around the website but can’t find any solutions.

    Fatal error: Call to undefined method: wp_error->get_items() in /nfs/c05/h01/mnt/69347/domains/ on line 196

    I think I am using WordPress version 2.8.5 but can’t see where it says that. I’m seeing the option to upgrade to 3.0.1

    Thanks in advance for your help


Viewing 4 replies - 1 through 4 (of 4 total)
  • to fix this problem replace code at line 196 from:

    $rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );


    $rss_items = array();
    if (!is_wp_error( $rss ) ) {
    	$rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );

    and all will be ok

    Hi marchenko.alexandr,

    The error message is not there now so I think things are ok now. Thank you for the coding. I will use it if I get the same error message in the future.

    Thank you

    this error will reproduce every time when plugin site rss feed will not work, anyway this is really not “Fatal error” so we may do not make any changes – nothing will happend

    Just wanted to thank you marchenko for your solution. You saved me hours of pulling my hair out 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Analytics for WordPress – Fatal error message’ is closed to new replies.