#18677 [NEW]: Bug in trim() function

From: Date: Wed, 31 Jul 2002 18:13:40 +0000
Subject: #18677 [NEW]: Bug in trim() function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15699@lists.php.net to get a copy of this message
From: ghort@email.cz Operating system: WindowsXP PHP version: 4.1.2 PHP Bug Type: Unknown/Other Function Bug description: Bug in trim() function 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 bug report at http://bugs.php.net/?id=18677&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18677&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18677&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18677&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18677&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18677&r=support Expected behavior: http://bugs.php.net/fix.php?id=18677&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18677&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18677&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18677&r=globals

« previous php.bugs (#15699) next »