This commit is contained in:
guanxiying
2021-07-02 14:33:57 +08:00
+2 -2
View File
@@ -3214,8 +3214,8 @@ class storyModel extends model
*/
public function getSubject($story)
{
$productName = $this->loadModel('product')->getById($story->product)->name;
return 'STORY #' . $story->id . ' ' . $story->title . ' - ' . $productName;
$productName = empty($story->product) ? '' : ' - ' . $this->loadModel('product')->getById($story->product)->name;
return 'STORY #' . $story->id . ' ' . $story->title . $productName;
}
/**