1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix possible nullref

This commit is contained in:
Matthew Brown 2017-05-29 23:21:46 -04:00
parent 8c0aced195
commit fa4678912f

View File

@ -169,7 +169,7 @@ class CommentChecker
throw $e;
}
if (count($line_parts) === 1 && $line_parts[0][0] === '$') {
if (count($line_parts) === 1 && isset($line_parts[0][0]) && $line_parts[0][0] === '$') {
array_unshift($line_parts, 'mixed');
}