#40617 [Csd]: problem refinement

From: Date: Sat, 24 Feb 2007 03:35:31 +0000
Subject: #40617 [Csd]: problem refinement
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109458@lists.php.net to get a copy of this message
ID: 40617 User updated by: nevermind at address dot org -Summary: memory corruption Reported By: nevermind at address dot org Status: Closed Bug Type: Strings related Operating System: linux (FC6) PHP Version: 5.2.1 New Comment: non-alphabetic "search" argument for str_ireplace causes memory corruption. Previous Comments: ------------------------------------------------------------------------ [2007-02-24 02:05:33] nevermind at address dot org Likely this is too obscure to find with what I've provided. ------------------------------------------------------------------------ [2007-02-24 01:55:22] nevermind at address dot org Description: ------------ Repeated calls to str_ireplace appear to cause memory corruption if replacement is made. In my web application, the resulting string will "echo" fine but html page generated in subsequent class module is never served. str_replace works fine. Code working fine until upgrade to 5.2.1. Thanks - great stuff you guys do! Reproduce code: --------------- $str_s = str_replace( array('(t)', '(tm)', '™', chr(153)), ' (trade marked)', $str_s ); $str_s = str_replace( array('(r)', '(reg)', '®', chr(174)), ' (registered)', $str_s ); $str_s = str_replace( array('(c)', '(copy)', '©', chr(169)), ' (copyrighted)', $str_s ); Expected result: ---------------- proper substitution and web page served Actual result: -------------- guessing memory corruption as html never generated. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40617&edit=1

« previous php.bugs (#109458) next »