WordPress.org

Forums

Lockdown WP Admin
[resolved] Unwanted PHP notice on the frontend (3 posts)

  1. James Bonham
    Member
    Posted 1 year ago #

    I get a PHP notice on all frontend pages (WP 3.5.2, latest plugin version)...

    Notice: Undefined offset: 1 in **********/wp-content/plugins/lockdown-wp-admin/lockdown-wp-admin.php on line 571

    It's because exploding the request url doesn't always return a second item in the array. To fix it, you could do...

    lockdown-wp-admin.php, Line 571
    from...

    list( $base, $query ) = explode( '?', $request_url, 2 );

    to...

    $vars = explode( '?', $request_url, 2 );
    if( count( $vars ) == 2 )
      list( $base, $query ) = $vars;
    else
      $base = $vars[0];

    http://wordpress.org/extend/plugins/lockdown-wp-admin/

  2. Sean Fisher
    Member
    Plugin Author

    Posted 1 year ago #

    Great--I like it! Can you submit that as a pull request on GitHub?

    https://github.com/srtfisher/Lockdown-WPAdmin

  3. Sean Fisher
    Member
    Plugin Author

    Posted 1 year ago #

    I actually just did it myself and committed it here:

    https://github.com/srtfisher/Lockdown-WPAdmin/commit/782eaf099cb7a85f1a196477923230e8238f3fce

    You should see it in 2.0.2 release in the next few days.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Lockdown WP Admin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.