Skip to content

Commit 9c57186

Browse files
Check for truthy string before accessing 0th index (#111)
1 parent fe80b5c commit 9c57186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Support/Str.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function replaceScopeNameCapture(string $scopeName, array $capture
6565
return '';
6666
}
6767

68-
while ($result[0] === '.') {
68+
while ($result && $result[0] === '.') {
6969
$result = substr($result, 1);
7070
}
7171

0 commit comments

Comments
 (0)