[theme-reviewers] Need help with theme option page

Otto otto at ottodestruct.com
Fri Mar 15 16:52:12 UTC 2013


"Undefined index" are pretty much always where you're using a
variable's value without first testing if the variable is actually set
or not.

So if you have something like this:

if ( $_REQUEST['action'] == 'whatever' )

Then you need to modify it to this:

if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'whatever' )

-Otto



On Fri, Mar 15, 2013 at 11:36 AM, Carla Izumi Bamford
<decadent.muse.org at gmail.com> wrote:
> I'm trying to debug my function.php which is for the option page.
> And I need some help figuring this out.
>
> Notice: Undefined index: action in
> /home/sites/heteml/users47/0/0/0/000/web/work/wordpress/wp-content/themes/simplenotes/functions.php
> on line 187


More information about the theme-reviewers mailing list