Skip to content

Commit 682b9fb

Browse files
committed
Use strict in_array comparison
1 parent 25c2b1d commit 682b9fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stream.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static function createFromFile(string $filename, string $mode = 'r'): Str
102102
throw new \RuntimeException('The file ' . $filename . ' cannot be opened.');
103103
}
104104
if (false === $resource) {
105-
if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'])) {
105+
if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) {
106106
throw new \InvalidArgumentException('The mode ' . $mode . ' is invalid.');
107107
}
108108

0 commit comments

Comments
 (0)