MantisBT: master-2.25 a1b5eae8

Author Committer Branch Timestamp Parent
dregad dregad master-2.25 2023-08-07 19:54 master-2.25 030eab30
Affected Issues  0032809: PHP 8.1 deprecation notice in user_search_cache()
Changeset

Fix deprecated notice in user_search_cache()

PHPUnit test case LoginTest::testLoginWithNullPasswordIsRejected fails
on PHP 8.1 due to error: "strcmp(): Passing null to parameter 0000002
($string2) of type string is deprecated".

When $p_value is null, convert it to empty string before calling
strcmp/strcasecmp.

Fixes 0032809

mod - core/user_api.php Diff File