Check whether an empty array was passed
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 20 Sep 2024 07:39:42 +0000 (09:39 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Fri, 20 Sep 2024 07:39:42 +0000 (09:39 +0200)
See https://www.woltlab.com/community/thread/308310-usereditor-deleteall/

wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php

index f3f8e50852a76d64ba57a12b47e4759629a388c2..92ee291973d2b717dfc561307ab2fb3fbafb3352 100644 (file)
@@ -123,6 +123,10 @@ class ClipboardHandler extends SingletonFactory
      */
     public function unmark(array $objectIDs, $objectTypeID)
     {
+        if ($objectIDs === []) {
+            return;
+        }
+
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("objectTypeID = ?", [$objectTypeID]);
         $conditions->add("objectID IN (?)", [$objectIDs]);