Skip to content

Commit

Permalink
Ensure __toString() returns a string (fixes #105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Propaganistas committed Mar 11, 2019
1 parent 1988005 commit 1a9f17b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function __toString()
try {
return $this->formatE164();
} catch (Exception $exception) {
return $this->number;
return (string) $this->number;
}
}
}
}

0 comments on commit 1a9f17b

Please sign in to comment.