Skip to content

Commit

Permalink
Fix issue #20 (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
marienfressinaud committed Dec 4, 2012
1 parent 250c75d commit 0a07589
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public function nbEntries () {
}

public function _url ($value) {
if (!is_null ($value) && !preg_match ('#^https?://#', $value)) {
$value = 'http://' . $value;
}

if (!is_null ($value) && filter_var ($value, FILTER_VALIDATE_URL)) {
$this->url = $value;
} else {
Expand Down

0 comments on commit 0a07589

Please sign in to comment.