#18677 [Opn->Csd]: Bug in trim() function

From: Date: Wed, 31 Jul 2002 21:49:00 +0000
Subject: #18677 [Opn->Csd]: Bug in trim() function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15714@lists.php.net to get a copy of this message
ID: 18677 Updated by: kalowsky@php.net Reported By: ghort@email.cz -Status: Open +Status: Closed Bug Type: Unknown/Other Function Operating System: WindowsXP PHP Version: 4.1.2 New Comment: Unable to reproduce on CVS head on Win2k, and OSX. Upgrade to newer version and if it still fails, reopen the bug. Previous Comments: ------------------------------------------------------------------------ [2002-07-31 14:21:38] ghort@email.cz In HEX the result of that script is: 31 2E 6C 69 6E 65 0D 3C 62 72 20 2F 3E 0D 0A 32 2E 6C 69 6E 65 0D 3C 62 72 20 2F 3E 0D 0A 32 2E 6C 69 6E 65 I hope it's usefull ;o) Ghort* ------------------------------------------------------------------------ [2002-07-31 14:13:39] ghort@email.cz Hi! I have perhaps found a bug in trim() function. I have following script: $text = nl2br($text); $text = trim($text) The $text variable content ends of line (Unix "\n" or Windows "\r\n"). For example "1.line\r\n2.line\r\n3.line". But the result of the script above is "1.radek\r<br />\r\n2.radek\r<br />\r\n3.radek" instead of "1.radek<br />2.radek<br />3.radek". It is my mistake, or bug of trim() function...? Thanx for answer, Ghort* ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18677&edit=1

« previous php.bugs (#15714) next »