diff --git a/app/classes/Framadate/Services/InputService.php b/app/classes/Framadate/Services/InputService.php index a6c8fae..27beb8f 100644 --- a/app/classes/Framadate/Services/InputService.php +++ b/app/classes/Framadate/Services/InputService.php @@ -89,11 +89,14 @@ class InputService { * @return string|null */ private function returnIfNotBlank($filtered) { - if ($filtered && !empty(str_replace(' ', '', $filtered))) { - return $filtered; - } else { - return null; + if ($filtered) { + $withoutSpaces = str_replace(' ', '', $filtered); + if (!empty($withoutSpaces)) { + return $filtered; + } } + + return null; } } \ No newline at end of file