forked from ZwiiCMS-Team/ZwiiCMS
filter null param
This commit is contained in:
parent
7dc92583ac
commit
a7ec9f3059
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user