#19691 [Opn]: mb_ereg_match is broken, does not return FALSE
| From: | yohgaki@php.net | Date: | Tue, 01 Oct 2002 15:29:35 +0000 |
| Subject: | #19691 [Opn]: mb_ereg_match is broken, does not return FALSE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-20940@lists.php.net to get a copy of this message | ||
ID: 19691
Updated by: yohgaki@php.net
Reported By: jc@mega-bucks.co.jp
Status: Open
Bug Type: mbstring related
Operating System: Red Hat Linux 7.2
PHP Version: 4.2.3
New Comment:
s/page/paste/
Previous Comments:
------------------------------------------------------------------------
[2002-10-01 10:28:47] yohgaki@php.net
Just a comment.
When you submit bug. Submit with "complete" script that is possible to
copy & page, then execute.
It will speed up bug fix.
------------------------------------------------------------------------
[2002-10-01 09:25:32] jc@mega-bucks.co.jp
Seems like mbstring function is borked in 4.2.3 :)
mb_ereg_match doesn't seem to be returning a proper FALSE value when
passed to a conditional statement.
BUT, the return value is an empty string which *should* evaluate to
flase no?
Following output and code illustrate:
OUTPUT:
RETURN was **
a is FALSE
CODE:
if (mb_ereg_match("A", "X")) {
echo "MATCHES <BR>";
}
else {
"echo NO MATCH <BR>";
}
$a = mb_ereg_match("A", "X");
echo "RETURN was *$a*<BR>";
if ($a) {
}
else {
echo "a is FALSE<BR>";}
exit;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19691&edit=1