#34155 [Bgs->Opn]: Multibyte string functions trigger warnings unlike native functions
| From: | scott at vbulletin dot com | Date: | Wed, 17 Aug 2005 11:23:37 +0000 |
| Subject: | #34155 [Bgs->Opn]: Multibyte string functions trigger warnings unlike native functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83687@lists.php.net to get a copy of this message | ||
ID: 34155
User updated by: scott at vbulletin dot com
Reported By: scott at vbulletin dot com
-Status: Bogus
+Status: Open
Bug Type: mbstring related
Operating System: Irrelevant
PHP Version: 5CVS-2005-08-16 (CVS)
New Comment:
I'm reporting inconsitent behaviour, either add the same error message
to strrpos or remove it from mb_strrpos.
Probably add it to strrpos and strripos since the majority fo the
native string functions throw warnings on invalid parameters.
Previous Comments:
------------------------------------------------------------------------
[2005-08-17 09:50:40] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2005-08-16 20:56:53] scott at vbulletin dot com
Description:
------------
If you use mbstring.func_overload in php.ini various string functions
will be overloaded with their mb_* equivalents.
The mb functions will trigger warnings when certain parameters are
empty or null unlike their native counterparts.
Reproduce code:
---------------
<?php
var_dump(strrpos('', '/'));
var_dump(mb_strrpos('', '/'));
?>
Expected result:
----------------
bool(false)
bool(false)
Actual result:
--------------
bool(false)
Warning: mb_strrpos(): Empty haystack in
/home/vbulletin/public_html/dev/test.php on line 4
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34155&edit=1