Title: Widget.php problems
Last modified: August 19, 2016

---

# Widget.php problems

 *  [cornick](https://wordpress.org/support/users/cornick/)
 * (@cornick)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/)
 * 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](http://www.cornick.us) is 
   the site if you would like to look at it directly.
 * Any help would be appreciated, thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [cornick](https://wordpress.org/support/users/cornick/)
 * (@cornick)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792146)
 * 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.
 *  Thread Starter [cornick](https://wordpress.org/support/users/cornick/)
 * (@cornick)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792148)
 * 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
       ```
   
 *  [Mattnh](https://wordpress.org/support/users/mattnh/)
 * (@mattnh)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792224)
 * But you got it running.
    How?
 *  Thread Starter [cornick](https://wordpress.org/support/users/cornick/)
 * (@cornick)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792237)
 * 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.
 *  [Mattnh](https://wordpress.org/support/users/mattnh/)
 * (@mattnh)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792246)
 * 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](http://wordpress.org/support/topic/188991?replies=15)
 *  [kinan](https://wordpress.org/support/users/kinan/)
 * (@kinan)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792256)
 * 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,
 *  [kinan](https://wordpress.org/support/users/kinan/)
 * (@kinan)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792257)
 * 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?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Widget.php problems’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [kinan](https://wordpress.org/support/users/kinan/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/widgetphp-problems-1/#post-792257)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
