getgrav/grav · error · RuntimeException
500
500
Error message
Session hasn't been initialized.
What it means
Error "Session hasn't been initialized." thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Framework/Session/Session.php:46
class Session implements SessionInterface
{
/** @var array */
protected $options = [];
/** @var bool */
protected $started = false;
/** @var bool Lock released after a read-only start; the first write re-acquires it. */
protected $readonly = false;
/** @var Session */
protected static $instance;
/**
* @inheritdoc
*/
public static function getInstance()
{
if (null === self::$instance) {
throw new RuntimeException("Session hasn't been initialized.", 500);
}
return self::$instance;
}
/**
* Session constructor.
*
* @param array $options
*/
public function __construct(array $options = [])
{
// Session is a singleton.
if (\PHP_SAPI === 'cli') {
self::$instance = $this;
return;
}View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Framework/Session/Session.php:46 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17).
Data as JSON: /api/errors/e845c66e9a7dec3f.
Report an issue: GitHub.