From 73b011c088b091b51fcdd2418c5aeb77cd5d730b Mon Sep 17 00:00:00 2001 From: samin-z Date: Mon, 16 Mar 2026 13:15:33 +0100 Subject: [PATCH] title check for whitespace for title Signed-off-by: samin-z --- lib/Validators/BaseValidator.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Validators/BaseValidator.php b/lib/Validators/BaseValidator.php index 79e285ba60..7fa7d9191e 100644 --- a/lib/Validators/BaseValidator.php +++ b/lib/Validators/BaseValidator.php @@ -104,6 +104,14 @@ private function not_null($value): bool { * @return bool */ private function not_empty($value): bool { + // Treat string zero as a valid non-empty value while still rejecting other empty values + if ($value === '0') { + return true; + } + + if (is_string($value)) { + return strlen(trim($value)) > 0; + } return !empty($value); }