Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Ray Hooker
Ray Hooker
706 Points

Wordpress Widget Options Passed As String

I am working through the course on creating a plugin. I have run into what looks like a bug or change in the functionality of Wordpress. Using the code examples in the class, it is expect that an array will be passed to update (current and new), to the widget function and to the form function. What I have noticed is that when I have only one option, it is passing a string. I am running 4.2.4 in my system. It is possible that when I add other options, Wordpress will pass an array.. likely. I should add that even if I copy in the same completed code example, it expected an array but gets a string.

Ray