Re: cvs: php-src(PHP_5_2) / NEWS /ext/mbstring mbstring.c /ext/mbstring/libmbfl/mbfl mbfilter.c /ext/mbstring/tests bug45923.phpt

From: Date: Sat, 14 Feb 2009 12:39:54 +0000
Subject: Re: cvs: php-src(PHP_5_2) / NEWS /ext/mbstring mbstring.c /ext/mbstring/libmbfl/mbfl mbfilter.c /ext/mbstring/tests bug45923.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56243@lists.php.net to get a copy of this message
On 14.02.2009 10:35, Moriyoshi Koizumi wrote: > moriyoshi Sat Feb 14 07:35:01 2009 UTC > > Added files: (Branch: PHP_5_2) > /php-src/ext/mbstring/tests bug45923.phpt > > Modified files: > /php-src NEWS > /php-src/ext/mbstring mbstring.c > /php-src/ext/mbstring/libmbfl/mbfl mbfilter.c > Log: > - MFH: Fix Bug #45923 (mb_st[r]ripos() offset not handled correctly) This change (E_NOTICE -> E_WARNING) makes 12 tests to fail. --------------------------- - if ((offset > 0 && offset > mbfl_strlen(&haystack)) || - (offset < 0 && -offset > mbfl_strlen(&haystack))) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); - RETURN_FALSE; + { + int haystack_char_len = mbfl_strlen(&haystack); + if ((offset > 0 && offset > haystack_char_len) || + (offset < 0 && -offset > haystack_char_len)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string"); + RETURN_FALSE; + } } --------------------------- -- Wbr, Antony Dovgal

« previous php.cvs (#56243) next »