Commit 7cdb08941d50419f6388bed8225ceb39ec5a1d57
1 parent
2214350f
Some fixes
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
backend/controllers/BrandController.php
common/modules/product/models/Product.php
... | ... | @@ -142,7 +142,7 @@ class Product extends \yii\db\ActiveRecord |
142 | 142 | |
143 | 143 | public function getFullName() |
144 | 144 | { |
145 | - return $this->brand->name .' '. $this->name; | |
145 | + return empty($this->brand) ? $this->name : $this->brand->name .' '. $this->name; | |
146 | 146 | } |
147 | 147 | |
148 | 148 | public function getCategories() { | ... | ... |