From c7e1ee710bcc69cd8b2072ce8061ed16bea007fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 26 Feb 2021 15:15:25 +0100 Subject: [PATCH] Reject `packageID = -1` in LanguageEditor::updateFromXML() --- .../install/files/lib/data/language/LanguageEditor.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index e00236cfcd..bb6bc07641 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -387,6 +387,10 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje $itemData[] = $itemValue; $itemData[] = $categoryID; if ($packageID) { + if ($packageID == -1) { + throw new \BadMethodCallException('Specifying `-1` as the packageID is no longer supported.'); + } + $itemData[] = ($packageID == -1) ? PACKAGE_ID : $packageID; } -- 2.20.1