修复品牌一览页面品牌的标签不存在导致php报错的bug
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -107,8 +107,8 @@ class BrandModel | @@ -107,8 +107,8 @@ class BrandModel | ||
107 | $build['list'] = array(); | 107 | $build['list'] = array(); |
108 | foreach ($value as $row) { | 108 | foreach ($value as $row) { |
109 | $list['name'] = $row['brand_name']; | 109 | $list['name'] = $row['brand_name']; |
110 | - $list['isHot'] = ($row['is_hot'] === 'Y') ? true : false; | ||
111 | - $list['isNew'] = ($row['is_show_new'] === 'Y') ? true : false; | 110 | + $list['isHot'] = (isset($row['is_hot']) && $row['is_hot'] === 'Y') ? true : false; |
111 | + $list['isNew'] = (isset($row['is_show_new']) && $row['is_show_new'] === 'Y') ? true : false; | ||
112 | $list['url'] = Helpers::url('', null, $row['brand_domain']); | 112 | $list['url'] = Helpers::url('', null, $row['brand_domain']); |
113 | $build['list'][] = $list; | 113 | $build['list'][] = $list; |
114 | } | 114 | } |
-
Please register or login to post a comment