From eedafdfd8f073b0efb1816d8fca889adee675af6 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 30 Apr 2022 00:04:03 +0200 Subject: [PATCH] Translations: fix creation of empty session files --- plugins/dynamix/include/Translations.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/dynamix/include/Translations.php b/plugins/dynamix/include/Translations.php index ef74bc3d9..e680a16c3 100644 --- a/plugins/dynamix/include/Translations.php +++ b/plugins/dynamix/include/Translations.php @@ -16,10 +16,9 @@ if (session_status()==PHP_SESSION_NONE && !isset($login_locale)) { session_start(); session_write_close(); } -// delete empty session file +// remove empty and temporary (made by scripts) sessions $session = '/var/lib/php/sess_'.session_id(); if (file_exists($session) && filesize($session)==0) unlink($session); -// remove session which is created by scripts if (session_status()==PHP_SESSION_ACTIVE && count($_SESSION??[])==1 && isset($_SESSION['locale'])) session_destroy(); require_once "$docroot/webGui/include/Markdown.php";