Alexander N.=?UTF-8?Q?=20S=C3=B8rnes=20?=: User: replace deprecated ereg calls with preg
Alexander Nicolaysen Sørnes
asornes at winehq.org
Sat Oct 8 09:56:59 CDT 2011
Module: appdb
Branch: master
Commit: c628c926fe5e37dda1631aff4d8f56b9401269a4
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c628c926fe5e37dda1631aff4d8f56b9401269a4
Author: Alexander N. Sørnes <alexsornes at gmail.com>
Date: Tue Sep 27 12:15:54 2011 +0200
User: replace deprecated ereg calls with preg
---
include/user.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/user.php b/include/user.php
index b7cb192..4ebd925 100644
--- a/include/user.php
+++ b/include/user.php
@@ -456,7 +456,7 @@ class User {
while (strlen($nps)<$pass_len)
{
$c = chr(mt_rand (0,255));
- if (eregi("^[a-z0-9]$", $c)) $nps = $nps.$c;
+ if (preg_match("/[a-zA-Z0-9]/", $c)) $nps = $nps.$c;
}
return ($nps);
}
More information about the wine-cvs
mailing list