summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-27 14:43:46 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-27 14:43:46 +0200
commit580388bc79e340ddf44f52853524ecc03b9d339c (patch)
tree7fb3cc334826fececd1026951d2a31f9d0bb49c0 /system/libraries
parent6edf929449f50339c4cb52891426fa9d45e33e00 (diff)
valid_email() to always return boolean
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php2
-rw-r--r--system/libraries/Form_validation.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 0fcdbd83e..fdb9be4da 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -708,7 +708,7 @@ class CI_Email {
*/
public function valid_email($email)
{
- return filter_var($email, FILTER_VALIDATE_EMAIL);
+ return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f3087f883..353624100 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1076,7 +1076,7 @@ class CI_Form_validation {
*/
public function valid_email($str)
{
- return filter_var($str, FILTER_VALIDATE_EMAIL);
+ return (bool) filter_var($str, FILTER_VALIDATE_EMAIL);
}
// --------------------------------------------------------------------