WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
[resolved] [Minibug+fix] undefined variable error - 404 table (6 posts)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya, just upgraded to 3.4.6 and noticed a mini-bug (undefined variable). Please accept the below fix as a compliment to your plugin.

    File: /inc/admin/tables.php

    Find line 185:

    $data[$error['url']]['id'] = $error['id'];
    $data[$error['url']]['url'] = $error['url'];
    }

    Replace with:

    $data[$error['url']]['id'] = $error['id'];
    $data[$error['url']]['url'] = $error['url'];
    $data[$error['url']]['last'] = $error['timestamp'];
    }

    Hope this helps!

    Smile,
    Juliette

    http://wordpress.org/extend/plugins/better-wp-security/

  2. jrf
    Member
    Posted 1 year ago #

    On second look, disregard my previous code. The better fix would be:

    Find line 173:

    $data[$error['url']]['time'] = $data[$error['url']]['time'] > $error['timestamp'] ? $data[$error['url']]['last'] : $error['timestamp'];

    Replace with:

    $data[$error['url']]['time'] = $data[$error['url']]['time'] > $error['timestamp'] ? $data[$error['url']]['time'] : $error['timestamp'];
  3. Thank you. I'll get this in the dev version later today.

  4. jrf
    Member
    Posted 1 year ago #

    Excellent!

  5. Admittedly it took longer than I thought to get to this but you can find this fix in trunk or wait until the next version.

    Thanks!

  6. jrf
    Member
    Posted 1 year ago #

    No worries, as long as it makes to the plugin core, I'm happy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic