#39361 [Opn]: mbstring function overloading - done although not activated

From: Date: Fri, 03 Nov 2006 14:55:55 +0000
Subject: #39361 [Opn]: mbstring function overloading - done although not activated
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104322@lists.php.net to get a copy of this message
 ID:               39361
 User updated by:  christoph at ziegenberg dot de
-Summary:          mbstring function overloading - local value ignored
 Reported By:      christoph at ziegenberg dot de
 Status:           Open
 Bug Type:         mbstring related
 Operating System: Win XP SP 2
 PHP Version:      5.2.0
 New Comment:

wrong summary


Previous Comments:
------------------------------------------------------------------------

[2006-11-03 14:54:41] christoph at ziegenberg dot de

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39361&edit=1


Thread (14 messages)

« previous php.bugs (#104322) next »