Support » Plugin: Auto Hide Admin Bar » Updating to v1.4 throws errors due to new empty options

  • Resolved hanfox

    (@hanfox)


    With the new update the new $options don’t exist until you’ve saved the settings

    wp-content/plugins/auto-hide-admin-bar/auto-hide-admin-bar.php:170:

    if ( ( $options[ 'arrow' ] != '' ) && ( is_numeric( $options[ 'arrow' ] ) ) ) {

    wp-content/plugins/auto-hide-admin-bar/auto-hide-admin-bar.php:170:

    if ( ( $options[ 'arrow_pos' ] != '' ) && ( is_string( $options[ 'arrow_pos' ] ) ) ) {

    Surely the better way to do these checks instead of != '' would be to use !empty($options[ 'arrow' ])?

    That way it’d make sure the key exists and that it’s not blank.

    • This topic was modified 3 months, 2 weeks ago by  hanfox.
    • This topic was modified 3 months, 2 weeks ago by  hanfox.
Viewing 1 replies (of 1 total)
  • Plugin Author Marcel Bootsman

    (@mbootsman)

    Thanks for reporting this @hanfox
    I have fixed the code and released version 1.4.1

    FYI I have tested with empty options to make sure all variable check are done in the right way.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.