Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from altheeagle/master
Browse files Browse the repository at this point in the history
Updated Message.php
  • Loading branch information
Mario Mueller authored Oct 2, 2016
2 parents 413e728 + 2887dff commit f3220b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Prowl/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ class Message {
* @return void
*/
public function setUrl($sUrl) {
$sUrl = filter_var($sUrl, FILTER_VALIDATE_URL);
$bVarRes = boolval(filter_var($sUrl, FILTER_VALIDATE_URL));

if (!$sUrl) {
if (stripos($sUrl,'tel:') === 0 ) {
$bVarRes = true;
} else {
$bVarRes = false;
}

if (!$bVarRes) {
throw new \InvalidArgumentException("Given url [$sUrl] did not pass the validation.");
}

Expand Down

0 comments on commit f3220b6

Please sign in to comment.