uhm-coe / authorizer

Authorizer is a WordPress plugin that uses Google, CAS, LDAP, or an OAuth2 provider for logins, and can prevent public access to a WordPress site. It also blocks repeated failed login attempts.
GNU General Public License v3.0
64 stars 36 forks source link

Undefined array key ldap_test_user #140

Closed MattMcAdams closed 6 months ago

MattMcAdams commented 7 months ago

I haven't tested this on a single site installation yet, as we're starting the roll out with our multisite, but we get this error:

Warning: Undefined array key "ldap_test_user" in REDACTED/wp-content/plugins/authorizer/src/authorizer/class-options.php on line 211

Commenting this line out works for now, as suggested by the author here https://wordpress.org/support/topic/php-8-error-ldap_test_user-again/

Mostly wanted to open an issue to make sure this is tracked for the future. Thanks for your continued support! If there's anything I can do to help, just let me know / point me in the right direction and I'll give it my best shot.

Additional technical info

Possible duplicate of https://github.com/uhm-coe/authorizer/issues/118 ?

figureone commented 7 months ago

Yeah this is a weird one that keeps popping up. It's harmless but we'd still like to get to the bottom of it.

We have several database migrations that were supposed to set a default for this (new) option but for some reason they didn't take for you. Likely something multisite specific. https://github.com/uhm-coe/authorizer/blob/master/src/authorizer/class-updates.php#L491-L509

Can you check the option value auth_version in wp_options and let us know what the value is? If it's out of date then there's an issue with applying the database migrations, possibly due to a timeout after updating if you have lots of subsites.

select option_value from wp_options where option_name='auth_version';

20230222 should be the latest.

MattMcAdams commented 7 months ago

Yep, the value we have for that is 20230222

figureone commented 6 months ago

We couldn't really reproduce the root cause of this one, so the upcoming release will just include a default value for that option if it doesn't exist. Should silence the log warning at least! https://github.com/uhm-coe/authorizer/commit/8197d013851ceee5076687c4c17fda4699f1a65d

Please let us know if you see any other log pollution. Cheers