Skip to content

Commit

Permalink
Fix null value of content for str_replace function
Browse files Browse the repository at this point in the history
  • Loading branch information
shankhadevpadam authored Jul 1, 2024
1 parent 6e6ce11 commit 709aac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function getBounceRatioAttribute()
public function getMergedContentAttribute(): ?string
{
if ($this->template_id) {
return str_replace(['{{content}}', '{{ content }}'], $this->content, $this->template->content);
return str_replace(['{{content}}', '{{ content }}'], $this->content ?? '', $this->template->content);
}

return $this->content;
Expand Down

0 comments on commit 709aac9

Please sign in to comment.