PHP 4.0 Bug #8061 Updated: wordwrap

From: Date: Fri, 01 Dec 2000 01:29:40 +0000
Subject: PHP 4.0 Bug #8061 Updated: wordwrap
Groups: php.dev 
Request: Send a blank email to php-dev+get-39743@lists.php.net to get a copy of this message
ID: 8061 Updated by: fmk Reported By: al.wo@gmx.de Status: Closed Bug Type: Strings related Assigned To: Comments: Counter used to find split position was compared with the string length. A string of length 40 will have positions 0-39. The bug has been fixed. Previous Comments: --------------------------------------------------------------------------- [2000-11-30 18:20:34] al.wo@gmx.de The function wordwrap seems to have a bug: $tmp1="xxxxxxxx! dsfksdjfklsdjf sdflkjxxxx 1111"; $tmp2 = wordwrap($tmp1, 39); this gives the *wrong* result - this string is 40 chars long!: --- Cut --- xxxxxxxx! dsfksdjfklsdjf sdflkjxxxx 1111 --- Cut --- if you use $tmp1="xxxxxxxx! dsfksdjfklsdjf sdflkjxxxx 1111x"; $tmp2 = wordwrap($tmp1, 39); this gives the *correct* result: --- Cut --- xxxxxxxx! dsfksdjfklsdjf sdflkjxxxx 1111x --- Cut --- --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8061

« previous php.dev (#39743) next »