Skip to content

Commit 582f7ed

Browse files
committed
Fix is associative array static method
1 parent 8d2da20 commit 582f7ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/OpenTok/Util/Validators.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,12 @@ public static function validateDTMFDigits(string $digits): void
423423
// Helpers
424424

425425
// credit: http://stackoverflow.com/a/173479
426-
protected static function isAssoc($arr)
426+
protected static function isAssoc($arr): bool
427427
{
428+
if (array() === $arr) {
429+
return false;
430+
}
431+
428432
return array_keys($arr) !== range(0, count($arr) - 1);
429433
}
430434

0 commit comments

Comments
 (0)