Przeglądaj źródła

fixed null string error

tags/v1.0.2^0
Robin Thoni 7 lat temu
rodzic
commit
e82f96416d
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2
    2
      app/DataAccess/RoutesDataAccess.php

+ 2
- 2
app/DataAccess/RoutesDataAccess.php Wyświetl plik

@@ -28,8 +28,8 @@ class RoutesDataAccess
28 28
             $dbo = new RoutesDbo();
29 29
             $dbo->setId($route["id"]);
30 30
             $dbo->setName($route["name"]);
31
-            $dbo->setBgColor($route["color"]);
32
-            $dbo->setFgColor($route["text_color"]);
31
+            $dbo->setBgColor($route["color"] == null ? "#ffffff" : $route["color"]);
32
+            $dbo->setFgColor($route["text_color"] == null ? "#aa0000" : $route["text_color"]);
33 33
             $dbos[] = $dbo;
34 34
         }
35 35
         return $dbos;

Ładowanie…
Anuluj
Zapisz