Support » Plugin: WP Login Attempt Log » Works great in WP 3.9.2, having problems in 4.0 beta

  • Resolved agkozak

    (@agkozak)


    Thanks you so much for this plugin. It is very useful. I have no trouble at all using it on my site running WordPress 3.9.2, but when I try to install it on the site where I’m beta-testing WordPress 4.0 beta, I get the error message

    Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-login-attempt-log/lal-settings-init.php on line 117

    Other than the fact that I’m using the beta version of WordPress on the latter site, the two sites are quite similar: identical themes, virtually the same plugins.

    Do you have any advice? Many thanks.

    https://wordpress.org/plugins/wp-login-attempt-log/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter agkozak

    (@agkozak)

    I also noticed that the plugin is always looking for Chart.min.js, which should be in the assets directory but doesn’t seem to be included. I downloaded it from GitHub, and the 404s stopped, but I don’t really notice the charts looking any different.

    Thread Starter agkozak

    (@agkozak)

    I tried replacing

    return $wpdb->get_results($sql)[0];

    in line 117 of lal-settings-init.php with

    $results=$wpdb->get_results($sql);

    if($results)

    return $results[0];

    else

    return false;

    Now I can install and use the plugin on my 4.0beta installation, and it seems to work. But I’m not really a programmer – is what I did solid?

    I had noticed that this plugin was causing wp-cli to crash on my other server, but when I made the change it made things better.

    Plugin Author fredsted

    (@fredsted)

    Hi agkozak,

    I’ll be releasing a new version shortly, in a couple days. Stay tuned.

    Plugin Author fredsted

    (@fredsted)

    New version has been released.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Works great in WP 3.9.2, having problems in 4.0 beta’ is closed to new replies.