summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorVivek Dinesh <vivekdinesh5@gmail.com>2016-08-11 14:51:11 +0200
committerVivek Dinesh <vivekdinesh5@gmail.com>2016-08-11 14:51:11 +0200
commit669cc5f881970ec3cc19b57f4da0382c7d8f5542 (patch)
tree65ce23c2af8da403b86857b89dc52eb46e726eb7 /system/libraries
parentb6ed3d102dc7c8e2a591405e56aa780d64d385d6 (diff)
Removed useless checks
Based on GitHub discussion. Signed-off-by: Vivek Dinesh <vivekdinesh5@gmail.com>
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php7
1 files changed, 1 insertions, 6 deletions
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;
}