X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSession%2FDatabaseSessionHandler.php;h=9bb1180ec1956aa6d1d8d2127c52e1464f41aeba;hb=64847e7cc8ca8f157cae4994c71b93df28624d6f;hp=91788588faeb3f77e775feae960ac3dfbcceee77;hpb=2f28c2ebbfd8f66093d7081d40b1d48f65fcff20;p=friendica.git diff --git a/src/Core/Session/DatabaseSessionHandler.php b/src/Core/Session/DatabaseSessionHandler.php index 91788588fa..9bb1180ec1 100644 --- a/src/Core/Session/DatabaseSessionHandler.php +++ b/src/Core/Session/DatabaseSessionHandler.php @@ -8,10 +8,6 @@ use Friendica\Core\Session; use Friendica\Database\DBA; use SessionHandlerInterface; -require_once 'boot.php'; -require_once 'include/dba.php'; -require_once 'include/text.php'; - /** * SessionHandler using database * @@ -26,7 +22,7 @@ class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterfa public function read($session_id) { - if (!x($session_id)) { + if (empty($session_id)) { return ''; } @@ -50,6 +46,7 @@ class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterfa * @param string $session_id Session ID with format: [a-z0-9]{26} * @param string $session_data Serialized session data * @return boolean Returns false if parameters are missing, true otherwise + * @throws \Exception */ public function write($session_id, $session_data) {