<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From: Jack Cherng &lt;jfcherng@gmail.com&gt;
Date: Sat, 13 Jul 2019 00:56:28 +0800
Subject: [PATCH] Fix access array offset on value of type null

Reference: https://twitter.com/nikita_ppv/status/1148931277216800769

Signed-off-by: Jack Cherng &lt;jfcherng@gmail.com&gt;

--- a/lib/Doctrine/Common/Annotations/DocParser.php
+++ b/lib/Doctrine/Common/Annotations/DocParser.php
@@ -964,7 +964,8 @@ private function Identifier()
 
         $className = $this-&gt;lexer-&gt;token['value'];
 
-        while ($this-&gt;lexer-&gt;lookahead['position'] === ($this-&gt;lexer-&gt;token['position'] + strlen($this-&gt;lexer-&gt;token['value']))
+        while (null !== $this-&gt;lexer-&gt;lookahead
+                &amp;&amp; $this-&gt;lexer-&gt;lookahead['position'] === ($this-&gt;lexer-&gt;token['position'] + strlen($this-&gt;lexer-&gt;token['value']))
                 &amp;&amp; $this-&gt;lexer-&gt;isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) {
 
             $this-&gt;match(DocLexer::T_NAMESPACE_SEPARATOR);
</pre></body></html>