• Resolved gonebeta

    (@gonebeta)


    Hi

    First I’ll like to thank you for the wonderful plugin! it has saved me quite a lot of time. I went from getting over 500(!) login attempts on one of my clients site per day to zero! A very smart concept I must say.

    Now to the issue I have, when I login to admin panel of one of my site, I’m getting this message from wordpress:

    Notice: Undefined index: sanitization in /public/wp-content/plugins/wp-login-door/settings.php on line 131

    Can you please look into that?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author toxnico

    (@toxnico)

    Hello,

    You’re welcome, the pleasure is mine!
    Thank you for your feedback; actually php notices are disabled on my server, so I didn’t see them.
    Of course I’ll have a look and fix these messages.

    Cheers

    Nico

    Thread Starter gonebeta

    (@gonebeta)

    Hello Nico,

    were you able to look into this?
    I still have the same error on all the sites I’m using this on.

    Any work around?

    -Da

    Plugin Author toxnico

    (@toxnico)

    Hi Gonebeta,

    I could not manage to reproduce the issue, event with E_NOTICE activated in my php.ini. But may I ask you to try the following before I submit an update?

    1. Locate the lines 57 to 61 in the file settings.php
    2. Replace them with this: (let’s hope the code tag works!)
    3. Tell me if the message disappear and I’ll post the update ??

    Thanks,

    Nico

    /////////////////////////////

    $this->options[] = array('name'=>'wp-door-keyname', 'type'=>'text', 'label'=>'Key name', 'callback'=>array($this, 'field_callback'), 'default'=>'_key', 'sanitization'=>array($this, 'sanitize_key_callback'));
    $this->options[] = array('name'=>'wp-door-keyvalue', 'type'=>'text', 'label'=>'Key value', 'callback'=>array($this, 'field_callback'), 'default'=>'_value', 'sanitization'=>null);
    $this->options[] = array('name'=>'wp-door-errormessage', 'type'=>'text', 'label'=>'Error message', 'callback'=>array($this, 'field_callback'), 'default'=>'error', 'sanitization'=>null);
    $this->options[] = array('name'=>'wp-door-disable-xml-rpc', 'type'=>'bool', 'label'=>'Disable XML RPC', 'callback'=>array($this, 'field_callback'), 'default'=>'on', 'sanitization'=>null);
    $this->options[] = array('name'=>'wp-door-redirect-home', 'type'=>'bool', 'label'=>'Redirect to home page on error', 'callback'=>array($this, 'field_callback'), 'default'=>'off', 'sanitization'=>null);

    /////////////////////////////

    • This reply was modified 8 years ago by toxnico.
    Plugin Author toxnico

    (@toxnico)

    Hi Gonebeta,
    I could not reproduce your issue, but before I patch the file, can you please try to replace the lines 57 to 61 with the following, in the file settings.php?

    /////////////////////////////

        $this->options[] = array('name'=>'wp-door-keyname', 'type'=>'text', 'label'=>'Key name', 'callback'=>array($this, 'field_callback'), 'default'=>'_key', 'sanitization'=>array($this, 'sanitize_key_callback'));
        $this->options[] = array('name'=>'wp-door-keyvalue', 'type'=>'text', 'label'=>'Key value', 'callback'=>array($this, 'field_callback'), 'default'=>'_value', 'sanitization'=>null);
        $this->options[] = array('name'=>'wp-door-errormessage', 'type'=>'text', 'label'=>'Error message', 'callback'=>array($this, 'field_callback'), 'default'=>'error', 'sanitization'=>null);
        $this->options[] = array('name'=>'wp-door-disable-xml-rpc', 'type'=>'bool', 'label'=>'Disable XML RPC', 'callback'=>array($this, 'field_callback'), 'default'=>'on', 'sanitization'=>null);
        $this->options[] = array('name'=>'wp-door-redirect-home', 'type'=>'bool', 'label'=>'Redirect to home page on error', 'callback'=>array($this, 'field_callback'), 'default'=>'off', 'sanitization'=>null);

    Thanks,

    Nico

    Thread Starter gonebeta

    (@gonebeta)

    Yes! That actually fixed it!
    Thanks ??

    Plugin Author toxnico

    (@toxnico)

    Cool!

    I committed the patch, so you just have to update the plugin to its latest version (1.4).
    Thank you for your feedback (and patience!)

    All the best,

    Nico

    Thread Starter gonebeta

    (@gonebeta)

    Thanks! I wish a lot more people know about this small but smart plugin! ??
    Keep up the good work!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error on line 131 of settings.php’ is closed to new replies.