Fix redirect after submitting ContactForm
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 6 Apr 2023 11:56:09 +0000 (13:56 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 6 Apr 2023 11:56:09 +0000 (13:56 +0200)
The empty string is an invalid controller name. The landing page link is
requested by either passing `null` or leaving out all parameters.

This misuse will throw an Exception in WoltLab Suite 6.0.

Fixes #5407

wcfsetup/install/files/lib/form/ContactForm.class.php

index d1ac7d408e77bd12cbdc618a985daa2ad43217ea..e9959889ea0005fc2f4f259889a95a900317fb76 100644 (file)
@@ -222,7 +222,7 @@ class ContactForm extends AbstractCaptchaForm
         $this->saved();
 
         HeaderUtil::delayedRedirect(
-            LinkHandler::getInstance()->getLink(''),
+            LinkHandler::getInstance()->getLink(),
             WCF::getLanguage()->getDynamicVariable('wcf.contact.success')
         );