WordPress.org

Ready to get started?Download WordPress

Forums

Widget.php problems (8 posts)

  1. cornick
    Member
    Posted 5 years ago #

    I recently got a new host and when I imported the database on the new host this is what my page says.

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/c/o/r/cornick/html/wp-includes/widgets.php on line 1337
    
    Warning: Invalid argument supplied for foreach() in /home/content/c/o/r/cornick/html/wp-includes/widgets.php on line 1337
    
    Fatal error: Cannot unset string offsets in /home/content/c/o/r/cornick/html/wp-includes/widgets.php on line 358

    There were more but I managed to fix them. I don't get the blog at all, I just get these error messages.
    http://www.cornick.us is the site if you would like to look at it directly.

    Any help would be appreciated, thanks!

  2. cornick
    Member
    Posted 5 years ago #

    Just to complicate matters. I created a web server. Copied all my wordpress files onto that and imported my database and I get the same problem.

    With the original files and all.

  3. cornick
    Member
    Posted 5 years ago #

    Scratch that, I actually get different errors because it's 2.5

    Warning: array_keys() [function.array-keys]: The first argument should be an array in W:\www\wp-includes\widgets.php on line 654
    
    Warning: Invalid argument supplied for foreach() in W:\www\wp-includes\widgets.php on line 654
    
    Warning: array_keys() [function.array-keys]: The first argument should be an array in W:\www\wp-includes\widgets.php on line 1307
    
    Warning: Invalid argument supplied for foreach() in W:\www\wp-includes\widgets.php on line 1307
    
    Fatal error: Cannot unset string offsets in W:\www\wp-includes\widgets.php on line 340
  4. Mattnh
    Member
    Posted 5 years ago #

    But you got it running.
    How?

  5. cornick
    Member
    Posted 5 years ago #

    Sorry for the delay.

    I manually went through the database and imported the data piece by piece until I found what was causing the problems.

    Removed the problems and the site worked after that. Took hours to do.

  6. Mattnh
    Member
    Posted 5 years ago #

    This is what did it for me:
    -Add this to your theme's functions.php file:
    delete_option('widget_rss');
    -Load your main webpage a couple of times.
    -Remove that line from the functions.php file again. You don't want to leave it there.
    -Go fix up your RSS widgets, as they'll be deleted by this process.
    http://wordpress.org/support/topic/188991?replies=15

  7. kinan
    Member
    Posted 5 years ago #

    Hi,
    I'm still facing this issue, although I added the line "delete_option" to all of the three functions.php files.
    Any suggestions?
    I'm upgrading from 2.3.3
    Thanks,

  8. kinan
    Member
    Posted 5 years ago #

    Okay, I think I missed the one under includes :)
    The issue is solved, but I'm having another error:

    Fatal error: Call to a member function get_row() on a non-object in /home/public_html/kinan/wp-includes/functions.php on line 387

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic