Skip to content

Commit 7c64394

Browse files
committed
fix(settings): Allow clearing legal and privacy links
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent c09168e commit 7c64394

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/theming/lib/Controller/ThemingController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function updateStylesheet($setting, $value) {
9292
if (strlen($value) > 500) {
9393
$error = $this->l10n->t('The given legal notice address is too long');
9494
}
95-
if (!$this->isValidUrl($value)) {
95+
if ($value !== '' && !$this->isValidUrl($value)) {
9696
$error = $this->l10n->t('The given legal notice address is not a valid URL');
9797
}
9898
break;
@@ -103,7 +103,7 @@ public function updateStylesheet($setting, $value) {
103103
if (strlen($value) > 500) {
104104
$error = $this->l10n->t('The given privacy policy address is too long');
105105
}
106-
if (!$this->isValidUrl($value)) {
106+
if ($value !== '' && !$this->isValidUrl($value)) {
107107
$error = $this->l10n->t('The given privacy policy address is not a valid URL');
108108
}
109109
break;

0 commit comments

Comments
 (0)