Skip to content

Commit

Permalink
Prevent PhoneFriendly from falling over if nouthing is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
gorriecoe committed Aug 9, 2018
1 parent de9a3f3 commit f7425e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/extensions/DBStringLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public function URLFriendly()
*/
public function PhoneFriendly()
{
return Phone::create($this->owner->value);
$value = $this->owner->value;
if ($value) {
return Phone::create($value);
}
}
}

0 comments on commit f7425e1

Please sign in to comment.