Stop reporting the pseudo options category as missing phrase
authorAlexander Ebert <ebert@woltlab.com>
Fri, 5 Jul 2024 11:07:42 +0000 (13:07 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 5 Jul 2024 11:07:42 +0000 (13:07 +0200)
wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php

index 980bc24666c5b4927e8e6c8249aa2af7410219d1..4c297cdcbd1358bebf4babbff688f4f7c15d22a2 100644 (file)
@@ -118,6 +118,14 @@ class ACPMenuItem extends DatabaseObject implements ITreeMenuItem
      */
     public function __toString(): string
     {
+        // This is a placeholder category that represents the dynamic menu items
+        // generated by categories in the `options.xml`. It has no title and
+        // trying to access its name causes a false-positive for missing phrases
+        // with every ACP request.
+        if ($this->menuItem === 'wcf.acp.menu.link.option.category') {
+            return 'wcf.acp.menu.link.option.category';
+        }
+
         return WCF::getLanguage()->get($this->menuItem);
     }