From 8b5eb3f66d59bba616ae04d2acc2f26bb1e634e6 Mon Sep 17 00:00:00 2001 From: Markus Baumer Date: Tue, 7 May 2024 20:38:43 +0200 Subject: [PATCH] Fix read file on empty files --- emhttp/plugins/dynamix/include/.login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/.login.php b/emhttp/plugins/dynamix/include/.login.php index 103fed3c1..87b66d383 100644 --- a/emhttp/plugins/dynamix/include/.login.php +++ b/emhttp/plugins/dynamix/include/.login.php @@ -17,7 +17,7 @@ if (!empty($_COOKIE['unraid_'.md5($server_name)])) { function readFromFile($file): string { $text = ""; - if (file_exists($file)) { + if (file_exists($file) && filesize($file) > 0) { $fp = fopen($file,"r"); if (flock($fp, LOCK_EX)) { $text = fread($fp, filesize($file));