summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/helpers/url_helper.php2
-rw-r--r--system/libraries/Form_validation.php7
2 files changed, 2 insertions, 7 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 82b9e02af..8a5a75c44 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -443,7 +443,7 @@ if ( ! function_exists('prep_url'))
*/
function prep_url($str = '')
{
- if (strtolower($str) === 'http://' OR $str === '')
+ if ($str === '')
{
return '';
}
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index fa28a6207..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 (strtolower($str) === 'http://' OR $str === '')
- {
- return '';
- }
-
- if (stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0)
+ if ($str !== '' && stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0)
{
return 'http://'.$str;
}