diff --git a/lib/Server/Server.php b/lib/Server/Server.php index 4966d78a5..966c1ea2a 100644 --- a/lib/Server/Server.php +++ b/lib/Server/Server.php @@ -55,7 +55,7 @@ public function SetSession($name, $value) public function GetSession($name) { - if (!$this->IsSessionStarted()) { + if (!$this->IsSessionStarted() && PHP_SAPI !== 'cli') { $parts = parse_url(Configuration::Instance()->GetScriptUrl()); $path = isset($parts['path']) ? $parts['path'] : ''; $seconds = Configuration::Instance()->GetKey(ConfigKeys::INACTIVITY_TIMEOUT, new IntConverter()) * 60;