Skip to content

Commit 8f43978

Browse files
committed
1 parent 46e0f94 commit 8f43978

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

wcfsetup/install/files/lib/acp/form/PageAddForm.class.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -537,18 +537,16 @@ protected function normalizeCustomUrl(string $customUrl): string
537537
*/
538538
protected function validateTitle()
539539
{
540-
if ($this->addPageToMainMenu) {
541-
if ($this->isMultilingual) {
542-
foreach ($this->availableLanguages as $language) {
543-
if (empty($this->title[$language->languageID])) {
544-
throw new UserInputException('title_' . $language->languageID);
545-
}
546-
}
547-
} else {
548-
if (empty($this->title[0])) {
549-
throw new UserInputException('title');
540+
if ($this->isMultilingual) {
541+
foreach ($this->availableLanguages as $language) {
542+
if (empty($this->title[$language->languageID])) {
543+
throw new UserInputException('title_' . $language->languageID);
550544
}
551545
}
546+
} else {
547+
if (empty($this->title[0])) {
548+
throw new UserInputException('title');
549+
}
552550
}
553551
}
554552

0 commit comments

Comments
 (0)