ID: 34155
Comment by: nil at hippy dot csoma dot elte dot hu
Reported By: scott at vbulletin dot com
Status: No Feedback
Bug Type: mbstring related
Operating System: *
PHP Version: 5CVS-2005-08-16 (CVS)
New Comment:
Hi!
It would be better not to give E_WARNING. If you search something in an
empty string then you will not find it. There is no special things
around here that needs to be "warning-ed". I had to write "if"s around
many strrpos() and strpos() calls when switched my site to UTF-8.
Regards, Nil.
Previous Comments:
------------------------------------------------------------------------
[2005-08-26 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-08-18 12:57:07] [EMAIL PROTECTED]
Please provide a list of functions that differ from native functions.
------------------------------------------------------------------------
[2005-08-17 13:23:35] scott at vbulletin dot com
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.
------------------------------------------------------------------------
[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