We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8adcf92 commit b412c12Copy full SHA for b412c12
src/PhpDocument.php
@@ -160,7 +160,9 @@ public function updateContent(string $content)
160
161
// Register this document on the project for references
162
foreach ($this->referenceNodes as $fqn => $nodes) {
163
- $this->index->addReferenceUri($fqn, $this->uri);
+ // Cast the key to string. If (string)'2' is set as an array index, it will read out as (int)2. We must
164
+ // deal with incorrect code, so this is a valid scenario.
165
+ $this->index->addReferenceUri((string)$fqn, $this->uri);
166
}
167
168
$this->sourceFileNode = $treeAnalyzer->getSourceFileNode();
0 commit comments