1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Update for PHP 5 -> PHP 7 transition
ereg() and eregi() were deprecated with PHP 5.3.0 and removed in PHP 7.0.0
https://secure.php.net/manual/en/function.ereg.php
https://secure.php.net/manual/en/function.eregi.php
Also remove min 2, max 4 character TLD portion of regex, as there are
top-level domains > 4 chars now.
Thanks to Ron Guerin <ron@vnetworx.net> for his help with the PHP regexes.
Author: Christopher Knadle <Chris.Knadle@coredump.us>
Bug-Debian: https://bugs.debian.org/821532
Bug-Debian: https://bugs.debian.org/821533
Last-Updated: 2016-05-22
--- a/contrib/web/php-user/mlmmj.php
+++ b/contrib/web/php-user/mlmmj.php
@@ -37,7 +37,7 @@
function is_email($string="")
{
- if (eregi("^[a-z0-9\._-]+".chr(64)."+[a-z0-9\._-]+\.+[a-z]{2,4}$", $string))
+ if (preg_match(chr(7)."^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]+$".chr(7).'i', $string))
{
return TRUE;
}
|