Browse Source

fixed null string error

tags/v1.0.2^0
Robin Thoni 8 years ago
parent
commit
e82f96416d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      app/DataAccess/RoutesDataAccess.php

+ 2
- 2
app/DataAccess/RoutesDataAccess.php View File

@@ -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;

Loading…
Cancel
Save