filter null param

This commit is contained in:
Fred Tempez 2022-10-05 10:36:13 +02:00
parent 7dc92583ac
commit a7ec9f3059

View File

@ -393,7 +393,7 @@ class helper
*/
public static function filter($text, $filter)
{
$text = trim($text);
$text = is_null($text) ? $text : trim($text);
switch ($filter) {
case self::FILTER_BOOLEAN:
$text = (bool) $text;