viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Fix issue with non-terminating while loop Controller.php, a=chris

Chris Pollett [2020-06-21 07:Jun:st]
Fix issue with non-terminating while loop Controller.php, a=chris
Filename
src/controllers/Controller.php
diff --git a/src/controllers/Controller.php b/src/controllers/Controller.php
index 323ec15a1..57a0bde0b 100755
--- a/src/controllers/Controller.php
+++ b/src/controllers/Controller.php
@@ -1105,6 +1105,8 @@ abstract class Controller
         while ($keep_deleting) {
             if (strlen(serialize($_SESSION)) >= C\MAX_USER_SESSION_SIZE) {
                 array_shift($_SESSION['seen_media']);
+            } else {
+                $keep_deleting = false;
             }
             if (count($_SESSION['seen_media']) <= 0) {
                 $keep_deleting = false;
ViewGit