Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d49e6c

Browse files
authored
Merge pull request #62 from justinyost/issue-61-product-text-field
Handle Cases in Product where Text Does Not Exist
2 parents dd86b91 + 551daa4 commit 5d49e6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/Entity/Product.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ public function getType()
3737

3838
/**
3939
* Text description, if available, of the product
40-
* @return string
40+
* @return string|null
4141
*/
4242
public function getText()
4343
{
44-
return $this->data['text'];
44+
return (isset($this->data['text'])) ? $this->data['text'] : null;
4545
}
4646

4747
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /