From 3f4caedfd4a78c8a2bce05511853bb05c8d5d130 Mon Sep 17 00:00:00 2001
From: Thomas Hackl <hackl@data-quest.de>
Date: Mon, 20 Nov 2023 08:12:45 +0000
Subject: [PATCH] Resolve "PHP8: Invalid parameter number: number of bound
 variables does not match number of tokens"

Closes #3484

Merge request studip/studip!2380
---
 lib/cronjobs/garbage_collector.class.php | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/cronjobs/garbage_collector.class.php b/lib/cronjobs/garbage_collector.class.php
index c56865d7c4b..13d3029a0ca 100644
--- a/lib/cronjobs/garbage_collector.class.php
+++ b/lib/cronjobs/garbage_collector.class.php
@@ -123,10 +123,7 @@ class GarbageCollectorJob extends CronJob
             AND `folders`.`chdate` < UNIX_TIMESTAMP(DATE_ADD(NOW(),INTERVAL -2 HOUR))
             AND ((`mvv_files_ranges`.`range_type` = 'Studiengang' AND `mvv_files_ranges`.`range_id` NOT IN ( SELECT `studiengang_id` FROM `mvv_studiengang`))
             OR (`mvv_files_ranges`.`range_type` = 'AbschlussKategorie' AND `mvv_files_ranges`.`range_id` NOT IN ( SELECT `kategorie_id` FROM `mvv_abschl_kategorie`))
-            OR (`mvv_files_ranges`.`range_type` = 'StgteilVersion' AND `mvv_files_ranges`.`range_id` NOT IN ( SELECT `version_id` FROM `mvv_stgteilversion`)))",
-            [
-                'user_id' => $GLOBALS['user']->id
-            ]
+            OR (`mvv_files_ranges`.`range_type` = 'StgteilVersion' AND `mvv_files_ranges`.`range_id` NOT IN ( SELECT `version_id` FROM `mvv_stgteilversion`)))"
         );
         if ($unsent_mvv_folders) {
             $db->exec("DELETE FROM mvv_files_filerefs WHERE fileref_id NOT IN (SELECT id FROM file_refs)");
-- 
GitLab