{"record":{"id":"e845c66e9a7dec3f","repo":"getgrav/grav","slug":"500-e845c6","errorCode":"500","errorMessage":"Session hasn't been initialized.","messagePattern":"Session hasn't been initialized\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":500,"severity":"error","filePath":"system/src/Grav/Framework/Session/Session.php","lineNumber":46,"sourceCode":"class Session implements SessionInterface\n{\n    /** @var array */\n    protected $options = [];\n    /** @var bool */\n    protected $started = false;\n    /** @var bool Lock released after a read-only start; the first write re-acquires it. */\n    protected $readonly = false;\n\n    /** @var Session */\n    protected static $instance;\n\n    /**\n     * @inheritdoc\n     */\n    public static function getInstance()\n    {\n        if (null === self::$instance) {\n            throw new RuntimeException(\"Session hasn't been initialized.\", 500);\n        }\n\n        return self::$instance;\n    }\n\n    /**\n     * Session constructor.\n     *\n     * @param array $options\n     */\n    public function __construct(array $options = [])\n    {\n        // Session is a singleton.\n        if (\\PHP_SAPI === 'cli') {\n            self::$instance = $this;\n\n            return;\n        }","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Framework/Session/Session.php#L28-L64","documentation":"Error \"Session hasn't been initialized.\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Framework/Session/Session.php:46 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"}