• Resolved iltdevunit

    (@iltdevunit)


    Hi,

    When I try to update user e.g. when changing a password or user role, I get this error:

    Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: wpDirAuthTOS' in C:\www\wordpress\wp-content\plugins\wpdirauth\wpDirAuth.php:1111 Stack trace: #0 C:\www\wordpress\wp-content\plugins\wpdirauth\wpDirAuth.php(1111): exceptions_error_handler(8, 'Undefined index...', 'C:\\w...', 1111, Array) #1 [internal function]: wpDirAuth_profileUpdate(45) #2 C:\www\wordpress\wp-includes\plugin.php(503): call_user_func_array('wpDirAuth_profi...', Array) #3 C:\www\wordpress\wp-includes\user.php(2094): do_action('profile_update', 45, Object(stdClass)) #4 C:\www\wordpress\wp-includes\user.php(2193): wp_insert_user(Array) #5 C:\www\wordpress\wp-admin\includes\user.php(176): wp_update_user(Object(stdClass)) #6 C:\www\wordpress\wp-admin\user-edit.php(159): edit_user(45) #7 {main} thrown in C:\www\wordpress\wp-content\plugins\wpdirauth\wpDirAuth.php on line 1111

    So it looks like ‘wpDirAuthTOS’ isn’t in the post data.

    I have ‘Terms of Services Agreement’ set to ‘no’ in Directory Authentication Options.

    I’m using wpDirAuth 1.7.9. and WordPress 4.3.1.

    https://www.ads-software.com/plugins/wpdirauth/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul Gilzow

    (@gilzow)

    Interesting. an undefined index isn’t usually a fatal error. And that particular line wasn’t changed in the recent update, so it should have been failing previously.

    What version of PHP are you using?

    Plugin Author Paul Gilzow

    (@gilzow)

    Undefined index should be throwing an E_NOTICE, not a fatal. Also, is it doing this on users who aren’t directory authenticated users? You mention changing passwords, and you can’t (or shouldnt be able to) change passwords for directory-authenticated users.

    Quick fix is to change line 1111 to
    if (isset($_POST['wpDirAuthTOS']) && intval($_POST['wpDirAuthTOS']) === 1) {

    Of which I’ve added to my current working copy and will include in the next update.

    Thread Starter iltdevunit

    (@iltdevunit)

    Hi,

    I’m using:
    LAMP (Uniserver Zero) on a windows box
    PHP 5.4.27, MSVC9 (Visual C++ 2008) x86 Architecture
    Apache 2.4.9 h

    The fatal error thing is very strange. I’ve had other strange, similar things happening across the site this week for no apparent reason ??

    Thread Starter iltdevunit

    (@iltdevunit)

    I think I’ve found the problem. I added a custom error handler to my functions file. This was to hide an error somewhere else in the site. A bit of a dirty hack, but as it’s clearly affecting the rest of the site, so I’ll rethink this.

    Sorry to trouble you!

    Plugin Author Paul Gilzow

    (@gilzow)

    No worries. Either way, it was a bit of lazy coding left in my plugin, so it’s good to get it corrected. Glad to see everything is working again for you.

    Plugin Author Paul Gilzow

    (@gilzow)

    Marking as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Undefined index: wpDirAuthTOS’ is closed to new replies.