mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
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:
parent
408f9e8256
commit
c1dd559965
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue