Title: widgets.php Problem
Last modified: August 19, 2016

---

# widgets.php Problem

 *  Resolved [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/)
 * After upgrading from WP2.2.3 to 2.6.2 I get the following error at the top of
   the blog pages both in the site and the admin pages.
 * If I replace the file widgets.php in the wp-includes directory with the older
   widgets.php file from my back-up of the 2.2.3 version the error disappears. Is
   it ok to do this or should I be using a different solution ?
 * Warning: array_keys(): The first argument should be an array in /share/storage/
   03/no/notxap/wp-includes/widgets.php on line 686
 * Warning: Invalid argument supplied for foreach() in /share/storage/03/no/notxap/
   wp-includes/widgets.php on line 686

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

 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867091)
 * If anyone can help I’d be very grateful.
 * Gary
 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867094)
 * Also get this error
 * Warning: Cannot modify header information – headers already sent by (output started
   at /share/storage/03/no/notxap/wp-includes/widgets.php:686) in /share/storage/
   03/no/notxap/wp-includes/pluggable.php on line 770
 * When changing themes
 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867095)
 * Dashboard doesn’t seem to work right either, the panels display “loading..”
 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867102)
 * Warning: array_search(): Wrong datatype for second argument in /share/storage/
   03/no/notxap/wp-admin/includes/widgets.php on line 85
 * Obviously putting an old version of widgets.php in the wp-includes was the wrong
   thing to do…
 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867104)
 * When I try to activate plugins I get the following error..
 * Warning: array_keys(): The first argument should be an array in /share/storage/
   03/no/notxap/wp-includes/widgets.php on line 686
 * Warning: Invalid argument supplied for foreach() in /share/storage/03/no/notxap/
   wp-includes/widgets.php on line 686
 * Warning: Cannot modify header information – headers already sent by (output started
   at /share/storage/03/no/notxap/wp-includes/widgets.php:686) in /share/storage/
   03/no/notxap/wp-includes/pluggable.php on line 770
 * Warning: Cannot modify header information – headers already sent by (output started
   at /share/storage/03/no/notxap/wp-includes/widgets.php:686) in /share/storage/
   03/no/notxap/wp-includes/pluggable.php on line 770
 * Warning: Cannot modify header information – headers already sent by (output started
   at /share/storage/03/no/notxap/wp-includes/widgets.php:686) in /share/storage/
   03/no/notxap/wp-includes/pluggable.php on line 770
 *  Thread Starter [notxap](https://wordpress.org/support/users/notxap/)
 * (@notxap)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867108)
 * Might be fixed. Seen this on another post and tried it…
 * Look at your wp-config.php file. If you see this line, remove it:
 * define(‘DB_CHARSET’, ‘utf8’);
 *  [gasyoun](https://wordpress.org/support/users/gasyoun/)
 * (@gasyoun)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867288)
 * Warning: array_keys() [function.array-keys]: The first argument should be an 
   array in /home/gasyoun/public_html/wp-includes/widgets.php on line 686
 * Warning: Invalid argument supplied for foreach() in /home/gasyoun/public_html/
   wp-includes/widgets.php on line 686
 * Same error, removing define(‘DB_CHARSET’, ‘utf8’); did not helped
    No way to 
   upgrade to 2.6.2 from 2.3 versions

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

The topic ‘widgets.php Problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 7 replies
 * 2 participants
 * Last reply from: [gasyoun](https://wordpress.org/support/users/gasyoun/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/widgetsphp-problem/#post-867288)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
