Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I don’t know much of anything, but I think there’s a problem with the widgets.php file. Several people have reported this error (I copied this from someone else’s post)

    Warning: array_keys(): The first argument should be an array in /home/www/stuff/yearxi/wp-includes/widgets.php on line 654

    Warning: Invalid argument supplied for foreach() in /home/www/stuff/yearxi/wp-includes/widgets.php on line 654

    The same thing was happening to me last night. It happened right after I had installed a text widget, then removed it. It installed fine. But when I removed it, the error occurred. Looking at the widgets.php file, the instance that the error is referring to – array_keys and foreach – seem to be dealing with the text widget. Text widgets are different since you can have more than one of them.

    I went back to look at what the widgets.php file looked like in 2.3 (might have been 2.2…it’s an old sort of dormant install) and there was nothing like that. And the little snooping I did, together with the wording of those warnings, makes me think that there’s just something plain written wrong there.

    Everything I read advised reverting to a back up, reinstalling, reupgrading. Blah. I just added back a text widget and the warnings went away.

    But I would love someone with more knowledge to let me know if the warnings going away and my adding back a text widget were just a ‘happy coincidence’. And if the issues described in this thread seem to be tied up with that same – foreach and array_keys area of widgets.php. The mystery is driving me mad!

    I got the same errors. I have a fairly fresh install of 2.5. No upgrading involved. I did export from wordpress.com and import into it.

    But, I encountered the problem when I was fiddling around with widgets. I widgetized my theme, so that could be it. But it was working fine for several days before I got the errors.

    I think I’ve tied the error to deleting a text widget. I think the error that it’s talking about having to do with foreach and array_keys surrounds the text widgets.

    I re-added a text widget…and the error messages disappeared.

    I don’t need help, but it seems that lots of people have had a similar problem so I thought this might help track down the source of the issue. (I HOPE I don’t need any help.)

    Thread Starter malisa

    (@malisa)

    Thanks. I did what you suggested. Worked perfect.

    I knew it was an issue that came about due to my changing the sidebar from the theme’s original. I was just suggesting that I report that the them IS 2.5 compatible.

    Thanks again.

    Thread Starter malisa

    (@malisa)

    Thanks. I’ll do that.

    I just followed the instructions on that Automattic doc. I basically just re-wrote it.

    Am I better off changing it? Is there a better way? While things are still bare…I’d rather change it now, rather than later if there’s a better way.

    Also, being so new, I don’t feel qualified to say, but should I post/tell someone that Simpla works in 2.5? It’s not on the ‘works’ or ‘doesn’t work’ list.

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