WordPress.org

Ready to get started?Download WordPress

Forums

Bowe Codes
[resolved] Receiving Undefined index notice on line 63? (3 posts)

  1. nathanegraham
    Member
    Posted 1 year ago #

    This is a fantastic plugin. However, I'm having a minor issue - I'm seeing this error when I debug on the staging server:

    Notice: Undefined index: page in wordpress/wp-content/plugins/bowe-codes/bowe-codes.php on line 63

    Suggestions?

    Thanks!

    http://wordpress.org/extend/plugins/bowe-codes/

  2. nathanegraham
    Member
    Posted 1 year ago #

    I figured it out. Here's what you have in /bowes-codes.php on line 63:

    if($_GET['page']=="bcodes-admin") wp_enqueue_style('bowe-codes-css', BOWE_CODES_PLUGIN_URL.'/css/admin.css');

    To get rid of the Notice: Undefined index error, change line 63 to this:

    if( isset($_GET['page']) && $_GET['page']=="bcodes-admin") wp_enqueue_style('bowe-codes-css', BOWE_CODES_PLUGIN_URL.'/css/admin.css');

    Let me know if I've made any errors here but I think this could be added to the next plugin update.

    Thanks,
    NG

  3. imath
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Nathan.

    Great catch. I'll make sure to include your fix on next upgrade.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic