PHP :: Bug #39361 :: mbstring function overloading
| Bug #39361 | mbstring function overloading - done although not activated | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2006-11-03 14:54 UTC | Modified: | 2006-12-22 02:58 UTC |
|
||||||||||
| From: | s dot masugata at digicom dot dnp dot co dot jp | Assigned: | masugata (profile) | |||||||||||
| Status: | Closed | Package: | mbstring related | |||||||||||
| PHP Version: | 5.2.0 | OS: | Win XP SP 2 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2006-11-03 14:54 UTC] s dot masugata at digicom dot dnp dot co dot jp
Description:
------------
I got a new error message in PHP 5.2 when using mb_strstr() with an empty string as haystack. So I wrote a testfile to compare the behaviour of strstr() with mb_strstr().
Although mbstring function overloading is not enabled and the phpinfo() output (in the same file, so there are no more changes via .htaccess) says that all mbstring settings are the default settings, strstr() is overloaded with mb_strstr().
phpinfo output:
---
Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding no value no value
mbstring.language neutral neutral
mbstring.strict_detection Off Off
mbstring.substitute_character no value no value
---
Reproduce code:
---------------
<?php
//phpinfo();
strstr('', ',');
mb_strstr('', ',');
?>
Expected result:
----------------
Warning: strstr() [function.strstr]: Empty haystack in W:\www\strstr\strstr.php on line 3
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in W:\www\strstr\strstr.php on line 4
Actual result:
--------------
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in W:\www\strstr\strstr.php on line 3
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in W:\www\strstr\strstr.php on line 4
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-11-03 17:28 UTC] christoph at ziegenberg dot de
[2006-11-03 18:06 UTC] christoph at ziegenberg dot de
[2006-12-21 18:15 UTC] christoph at ziegenberg dot de
[2006-12-22 02:58 UTC] masugata@php.net