ID: 34119 Updated by: [EMAIL PROTECTED] Reported By: ondrej at sury dot org -Status: Assigned +Status: Feedback Bug Type: mbstring related Operating System: Linux PHP Version: 4.4.0 Assigned To: hirokawa New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip It works fine for me. Please check it by CVS snapshot of PHP 4.4. Code: <?php $name = "user/1/viewuser/1/edit"; if (ereg("[^\x80-\xF7 [:alnum:[EMAIL PROTECTED]", $name)) { print "The username contains an illegal character.\n"; } else { print "ok.\n"; } ?> Result in PHP 4.4.2RC2-dev (Linux FedoraCore4): The username contains an illegal character. Previous Comments: ------------------------------------------------------------------------ [2005-12-24 02:32:29] [EMAIL PROTECTED] Rui, check this out please. ------------------------------------------------------------------------ [2005-08-13 20:29:39] [EMAIL PROTECTED] Moriyoshi, I guess you need to backport something..? ------------------------------------------------------------------------ [2005-08-13 13:12:22] ondrej at sury dot org Description: ------------ mb_ereg prints invalid regular expression error on certain characters. This is fixed in php 5.0.4. More information could be found at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=278044 Reproduce code: --------------- $name = "user/1/viewuser/1/edit"; if (mb_ereg("[^\x80-\xF7 [:alnum:[EMAIL PROTECTED]", $name)) print('The username contains an illegal character.'); Expected result: ---------------- The username contains an illegal character. Actual result: -------------- Warning: mb_ereg(): mbregex compile err: invalid regular expression in /var/www/mb_ereg.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34119&edit=1
