mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Fix session factory
This commit is contained in:
parent
c1c158ccda
commit
cde93c68dc
1 changed files with 10 additions and 4 deletions
|
@ -76,15 +76,21 @@ class Session
|
||||||
default:
|
default:
|
||||||
$handler = null;
|
$handler = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$session = new Native($baseURL, $handler);
|
|
||||||
|
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
$logger->notice('Unable to create session', ['mode' => $mode, 'session_handler' => $session_handler, 'exception' => $e]);
|
$logger->notice('Unable to create session', ['mode' => $mode, 'session_handler' => $session_handler, 'exception' => $e]);
|
||||||
$session = new Memory();
|
$session = new Memory();
|
||||||
} finally {
|
|
||||||
$profiler->stopRecording();
|
$profiler->stopRecording();
|
||||||
return $session;
|
return $session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$session = new Native($baseURL, $handler);
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
$logger->notice('Unable to create session', ['mode' => $mode, 'session_handler' => $session_handler, 'exception' => $e]);
|
||||||
|
$session = new Memory();
|
||||||
|
}
|
||||||
|
|
||||||
|
$profiler->stopRecording();
|
||||||
|
return $session;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue