Skip to content

Commit

Permalink
Merge pull request #62 from justinyost/issue-61-product-text-field
Browse files Browse the repository at this point in the history
Handle Cases in Product where Text Does Not Exist
  • Loading branch information
Swader authored Dec 15, 2017
2 parents dd86b91 + 551daa4 commit 5d49e6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public function getType()

/**
* Text description, if available, of the product
* @return string
* @return string|null
*/
public function getText()
{
return $this->data['text'];
return (isset($this->data['text'])) ? $this->data['text'] : null;
}

/**
Expand Down

0 comments on commit 5d49e6c

Please sign in to comment.