Fix too many placeholders when pruning the email log
authorMarcel Werk <burntime@woltlab.com>
Mon, 5 Aug 2024 14:23:15 +0000 (16:23 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 5 Aug 2024 14:23:15 +0000 (16:23 +0200)
Closes #5938

wcfsetup/install/files/lib/data/email/log/entry/EmailLogEntryAction.class.php

index 8c80ba2483edabe82c66565c6cb3bf6a6dad53ad..d7b39e259473fe7bd35b22c098578266226bd539 100644 (file)
@@ -29,9 +29,9 @@ class EmailLogEntryAction extends AbstractDatabaseObjectAction
     public function prune()
     {
         $sql = "SELECT  entryID
-                FROM    wcf" . WCF_N . "_email_log_entry
+                FROM    wcf1_email_log_entry
                 WHERE   time < ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql, 65_000);
         $statement->execute([
             (\TIME_NOW - EmailLogEntry::LIFETIME),
         ]);