1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +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; 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'); array_unshift($line_parts, 'mixed');
} }