diff options
author | Andrey Andreev <narf@devilix.net> | 2016-08-11 14:55:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-11 14:55:33 +0200 |
commit | b7b5ee6bee6395460a7f628cb16f75b0777ea44b (patch) | |
tree | 784991ea4ddcef07c660c071c9fb652d5003ba00 /system/libraries/Form_validation.php | |
parent | d864eb4828a1a4c327df1af4e84328a8dfd0be43 (diff) | |
parent | 669cc5f881970ec3cc19b57f4da0382c7d8f5542 (diff) |
Merge pull request #4764 from butane/uri_scheme_case
URI schemes are not case-sensitive
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 61f0298fd..86a569ced 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1523,12 +1523,7 @@ class CI_Form_validation { */ public function prep_url($str = '') { - if ($str === 'http://' OR $str === '') - { - return ''; - } - - if (strpos($str, 'http://') !== 0 && strpos($str, 'https://') !== 0) + if ($str !== '' && stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0) { return 'http://'.$str; } |