Explorar el Código

fixed null string error

tags/v1.0.2^0
Robin Thoni hace 7 años
padre
commit
e82f96416d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      app/DataAccess/RoutesDataAccess.php

+ 2
- 2
app/DataAccess/RoutesDataAccess.php Ver fichero

@@ -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…
Cancelar
Guardar