summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorVivek Dinesh <vivekdinesh5@gmail.com>2016-08-11 14:10:45 +0200
committerVivek Dinesh <vivekdinesh5@gmail.com>2016-08-11 14:10:45 +0200
commitb6ed3d102dc7c8e2a591405e56aa780d64d385d6 (patch)
treee305ae8a96c1bc7483317114339b53fa6472efe8 /system/libraries/Form_validation.php
parentc82e9968326b949d4cdad384f4645b28fa7c2f17 (diff)
URI schemes are not case-sensitive
Signed-off-by: Vivek Dinesh <vivekdinesh5@gmail.com>
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 61f0298fd..fa28a6207 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1523,12 +1523,12 @@ class CI_Form_validation {
*/
public function prep_url($str = '')
{
- if ($str === 'http://' OR $str === '')
+ if (strtolower($str) === 'http://' OR $str === '')
{
return '';
}
- if (strpos($str, 'http://') !== 0 && strpos($str, 'https://') !== 0)
+ if (stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0)
{
return 'http://'.$str;
}