فهرست منبع

Fix BanList\trimToNull()

Visman 4 سال پیش
والد
کامیت
ebd25a22d3
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      app/Models/BanList/Model.php

+ 3 - 2
app/Models/BanList/Model.php

@@ -30,9 +30,10 @@ class Model extends ParentModel
     /**
      * Фильтрует значение
      */
-    public function trimToNull(/* mixed */ $val, bool $toLower = false): ?string
+    public function trimToNull(?string $val, bool $toLower = false): ?string
     {
-        $val = \trim($val);
+        $val = \trim($val ?? '');
+
         if ('' == $val) {
             return null;
         } elseif ($toLower) {