{"record":{"id":"f3d527b2a93ab74c","repo":"nikic/PHP-Parser","slug":"invalid-position-information","errorCode":null,"errorMessage":"Invalid position information","messagePattern":"Invalid position information","errorType":"exception","errorClass":"\\RuntimeException","httpStatus":null,"severity":"error","filePath":"lib/PhpParser/NodeDumper.php","lineNumber":289,"sourceCode":"        if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) {\n            return null;\n        }\n\n        $start = $node->getStartLine();\n        $end = $node->getEndLine();\n        if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos')\n            && null !== $this->code\n        ) {\n            $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos());\n            $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos());\n        }\n        return \"[$start - $end]\";\n    }\n\n    // Copied from Error class\n    private function toColumn(string $code, int $pos): int {\n        if ($pos > strlen($code)) {\n            throw new \\RuntimeException('Invalid position information');\n        }\n\n        $lineStartPos = strrpos($code, \"\\n\", $pos - strlen($code));\n        if (false === $lineStartPos) {\n            $lineStartPos = -1;\n        }\n\n        return $pos - $lineStartPos;\n    }\n}\n","sourceCodeStart":271,"sourceCodeEnd":300,"githubUrl":"https://github.com/nikic/PHP-Parser/blob/fbd47f7ebcbb450138d92642a0a53b72a5285dda/lib/PhpParser/NodeDumper.php#L271-L300","documentation":"Error \"Invalid position information\" thrown in nikic/PHP-Parser.","triggerScenarios":"Thrown at lib/PhpParser/NodeDumper.php:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fbd47f7ebcbb450138d92642a0a53b72a5285dda","analyzedAt":"2026-08-17T03:58:32.123Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}