소스 검색

fixed null string error

tags/v1.0.2^0
Robin Thoni 7 년 전
부모
커밋
e82f96416d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      app/DataAccess/RoutesDataAccess.php

+ 2
- 2
app/DataAccess/RoutesDataAccess.php 파일 보기

@@ -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…
취소
저장