From bb721983c4ae98114f73da9cf5e0ccbf4fb1cffd Mon Sep 17 00:00:00 2001
From: David Siegfried <ds.siegfried@gmail.com>
Date: Mon, 8 Nov 2021 12:03:29 +0100
Subject: [PATCH] prevent warnings, refs #399

---
 templates/dates/seminar_html_roomplanning.php | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/templates/dates/seminar_html_roomplanning.php b/templates/dates/seminar_html_roomplanning.php
index f3311494aef..f95ccbbc2fb 100644
--- a/templates/dates/seminar_html_roomplanning.php
+++ b/templates/dates/seminar_html_roomplanning.php
@@ -1,7 +1,7 @@
 <?
 if (!isset($show_room)) :
     // show rooms only if there is more than one
-    if (empty($dates['rooms']) || sizeof($dates['rooms']) === 1) :
+    if (empty($dates['rooms']) || count($dates['rooms']) === 1) :
         $show_room = false;
     else :
         $show_room = true;
@@ -50,12 +50,12 @@ if (!empty($dates['regular']['turnus_data']) || !empty($dates['irregular'])) :
         endif;
     endforeach;
     unset($irregular_rooms['']);
-    echo sizeof($output) ? ", <br>" : '';
+    echo count($output) ? ", <br>" : '';
 
-    $rooms = array_merge(getPlainRooms($irregular_rooms, false), array_keys($freetext_rooms));
+    $rooms = array_merge(getPlainRooms($irregular_rooms), array_keys($freetext_rooms));
 
-    if (is_array($irregular) && sizeof($irregular)) :
-        if (isset($shrink) && !$shrink && sizeof($irregular < 20)) :
+    if (is_array($irregular) && count($irregular)) :
+        if (isset($shrink) && !$shrink && count($irregular) < 20) :
             foreach ($irregular as $date) :
                 echo $date['tostring'];
 
@@ -69,9 +69,9 @@ if (!empty($dates['regular']['turnus_data']) || !empty($dates['irregular'])) :
             endforeach;
         else :
             echo _("Termine am") . implode(', ', shrink_dates($irregular));
-            if (is_array($rooms) && sizeof($rooms) > 0) :
-                if (sizeof($rooms) > 3) :
-                    $rooms = array_slice($rooms, sizeof($rooms) - 3, sizeof($rooms));
+            if (is_array($rooms) && count($rooms) > 0) :
+                if (count($rooms) > 3) :
+                    $rooms = array_slice($rooms, count($rooms) - 3, count($rooms));
                 endif;
 
                 if ($show_room) :
-- 
GitLab