#19922 [Opn->Csd]: nl2br() fails for not empty strings without newline.
| From: | iliaa@php.net | Date: | Tue, 15 Oct 2002 19:22:06 +0000 |
| Subject: | #19922 [Opn->Csd]: nl2br() fails for not empty strings without newline. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22511@lists.php.net to get a copy of this message | ||
ID: 19922
Updated by: iliaa@php.net
Reported By: andreas.rieber@2e-systems.com
-Status: Open
+Status: Closed
Bug Type: Strings related
Operating System: FreeBSD
PHP Version: 4.3.0-pre1
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
This was fixed several days ago.
Previous Comments:
------------------------------------------------------------------------
[2002-10-15 13:22:41] nicos@php.net
This bug is verified if there is no such \n it outputs something
strange not even ISO.
------------------------------------------------------------------------
[2002-10-15 12:53:28] iliaa@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-10-15 12:44:41] andreas.rieber@2e-systems.com
The nl2br() function output is messed up, if the string is not empty
but has no newline.
testfile:
-----------------------------------------------------
--TEST--
Testing nl2br()
--FILE--
<?php
$stringa = "without newline";
$stringb = "with\nnewline";
echo nl2br( $stringa), "\n";
echo nl2br( $stringb), "\n";
?>
--EXPECT--
without newline
with
newline
log of test:
-----------------------------------------------------
---- EXPECTED OUTPUT
without newline
with
newline
---- ACTUAL OUTPUT
A ...(binay data can't copy :-)
with<br />
newline
---- FAILED
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19922&edit=1