fix: Use strict array comparisons in user_ldap

Otherwise there are issues with string values looking like numbers.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2026-01-13 11:46:57 +01:00
parent 408f9e8256
commit c1dd559965
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
3 changed files with 3 additions and 3 deletions

View file

@ -141,7 +141,7 @@ class Helper {
*/
public function deleteServerConfiguration($prefix) {
$prefixes = $this->getServerConfigurationPrefixes();
$index = array_search($prefix, $prefixes);
$index = array_search($prefix, $prefixes, true);
if ($index === false) {
return false;
}

View file

@ -447,7 +447,7 @@ abstract class AbstractMapping {
DELETE FROM `' . $this->getTableName() . '`
WHERE `owncloud_name` = ?');
$dn = array_search($name, $this->cache);
$dn = array_search($name, $this->cache, true);
if ($dn !== false) {
unset($this->cache[$dn]);
}

View file

@ -71,7 +71,7 @@ class DeletedUsersIndexTest extends \Test\TestCase {
// ensure the different uids were used
foreach ($deletedUsers as $deletedUser) {
$this->assertTrue(in_array($deletedUser->getOCName(), $uids));
$i = array_search($deletedUser->getOCName(), $uids);
$i = array_search($deletedUser->getOCName(), $uids, true);
$this->assertNotFalse($i);
unset($uids[$i]);
}