WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate Taxonomy Manager
[resolved] PHP Notices (4 posts)

  1. fireproofsocks
    Member
    Posted 3 years ago #

    See my other post. You MUST turn on PHP notices while developing, otherwise you won't be able to tell when you're writing bad code. And when someone tries to use this plugin on a server that is displaying PHP notices, they get notices popping up everywhere in the wp manager.

    Your code looks pretty good and pretty clean -- nice job. The biggest thing you have to fix is when you read variables out of the $_GET array.

    E.g. this will throw a notice if your URL doesn't have a 'myvar' parameter:

    if ( $_GET['myvar'] == 'something' )
    {
     // ... do something
    }

    Instead, you should spend the extra time to check whether or not the place in the array is set:

    if ( isset($_GET['myvar']) && $_GET['myvar'] == 'something' )
    {
      // ... do something
    }
  2. XYDAC
    Member
    Plugin Author

    Posted 3 years ago #

    Hey, i had the isset checks at many places but as my error reeportin was off snd it didnlt show the warnings so i kinda missed checking everywhere.
    thanks for pointing the issue mate, i'll make sure i remove the notices asap.

  3. XYDAC
    Member
    Plugin Author

    Posted 3 years ago #

    fixed: let me know if you still find any

  4. fireproofsocks
    Member
    Posted 3 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic