Skip to content

Commit 1df0410

Browse files
committed
array_key_exists_i() will now throw an exception if the key is not specified.
1 parent 734b0a9 commit 1df0410

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LdapSyncCommand.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,9 @@ private function in_array_i($needle, array $haystack): bool
15281528
*/
15291529
private function array_key_exists_i($key, array $haystack): bool
15301530
{
1531-
$key = strtolower($key);
1531+
if (!$key = strtolower($key)) {
1532+
throw new \Exception("Key not specified.");
1533+
}
15321534

15331535
foreach (array_change_key_case($haystack, CASE_LOWER) as $k => $v) {
15341536
if ($k === $key) {

0 commit comments

Comments
 (0)