Skip to content

Commit

Permalink
Merge pull request #90 from jsampedro77/fix-entity-to-string
Browse files Browse the repository at this point in the history
Fix entities __toString method by making sure they won't return null.
  • Loading branch information
slashfan authored Jul 10, 2017
2 parents 4456ffa + 5610b4d commit de9b63c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Entity/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct()
*/
public function __toString()
{
return $this->reference;
return $this->reference?:'';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Entity/EmailTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function __construct($lang = null)
*/
public function __toString()
{
return $this->lang;
return $this->lang?:'';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Entity/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getTranslation($lang)
*/
public function __toString()
{
return $this->reference;
return $this->reference?:'';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Entity/LayoutTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function __construct($lang = null)
*/
public function __toString()
{
return $this->lang;
return $this->lang?:'';
}

/**
Expand Down

0 comments on commit de9b63c

Please sign in to comment.