Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
From 1b001ad2efc98943cf3581ff4c10690bafd5b481 Mon Sep 17 00:00:00 2001
From: Robert Sesek
Date: Sun, 4 Jan 2009 19:27:20 -0800
Subject: [PATCH] Remove an unnecessary if/else and replace it with a single
return statement
* Functions.php:
(BSFunctions::is_valid_email)
---
Functions.php | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/Functions.php b/Functions.php
index 91a8eee..92195b5 100644
--- a/Functions.php
+++ b/Functions.php
@@ -213,14 +213,7 @@ class BSFunctions
*/
public static function is_valid_email($email)
{
- if (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email))
- {
- return true;
- }
- else
- {
- return false;
- }
+ return (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email));
}
/**
--
1.7.11.3