{"record":{"id":"5ba0059c8bb1c181","repo":"getgrav/grav","slug":"a-relative-uri-must-not-have-a-path-beginning-with","errorCode":null,"errorMessage":"A relative URI must not have a path beginning with a segment containing a colon","messagePattern":"A relative URI must not have a path beginning with a segment containing a colon","errorType":"validation","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Framework/Psr7/AbstractUri.php","lineNumber":410,"sourceCode":"            $this->host === \"\" &&\n            ($this->scheme === \"http\" || $this->scheme === \"https\")\n        ) {\n            throw new InvalidArgumentException(\n                \"Uri with a scheme must have a host\"\n            );\n        }\n\n        if ($this->getAuthority() === \"\") {\n            if (str_starts_with($this->path, \"//\")) {\n                throw new InvalidArgumentException(\n                    'The path of a URI without an authority must not start with two slashes \\'//\\''\n                );\n            }\n            if (\n                $this->scheme === \"\" &&\n                str_contains(explode(\"/\", $this->path, 2)[0], \":\")\n            ) {\n                throw new InvalidArgumentException(\n                    \"A relative URI must not have a path beginning with a segment containing a colon\"\n                );\n            }\n        } elseif (isset($this->path[0]) && $this->path[0] !== \"/\") {\n            throw new InvalidArgumentException(\n                'The path of a URI with an authority must start with a slash \\'/\\' or be empty'\n            );\n        }\n    }\n\n    /**\n     * @return bool\n     */\n    protected function isDefaultPort()\n    {\n        $scheme = $this->scheme;\n        $port = $this->port;\n","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Framework/Psr7/AbstractUri.php#L392-L428","documentation":"Error \"A relative URI must not have a path beginning with a segment containing a colon\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Framework/Psr7/AbstractUri.php:410 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":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}