#50403 [Bgs]: nl2br seems to be broken
| From: | l dot anzinger at gmail dot com | Date: | Tue, 08 Dec 2009 11:12:18 +0000 |
| Subject: | #50403 [Bgs]: nl2br seems to be broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145519@lists.php.net to get a copy of this message | ||
ID: 50403
User updated by: l dot anzinger at gmail dot com
Reported By: l dot anzinger at gmail dot com
Status: Bogus
Bug Type: Strings related
Operating System: Debian Squeeze
PHP Version: 5.2.11
New Comment:
Oh, I'm sorry, I didn't scrolled down to the changelog ...
Previous Comments:
------------------------------------------------------------------------
[2009-12-08 00:48:49] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The second parameter was introduced on 5.3 version, as documented in
the 'Changelog' section in the documentation.
------------------------------------------------------------------------
[2009-12-08 00:44:27] carsten_sttgt at gmx dot de
> Version: 5.2.11
> echo nl2br("foo\nbar", false);
^^^^^
Available as of 5.3.0:
http://www.php.net/nl2br#function.nl2br.changelog
Regards,
Carsten
------------------------------------------------------------------------
[2009-12-07 22:31:48] l dot anzinger at gmail dot com
Description:
------------
Using the second parameter of nl2br, as discribed in the docs
(http://php.net/nl2br), does not work.
Reproduce code:
---------------
<?php
echo nl2br("foo\nbar", false);
?>
Expected result:
----------------
foo<br>
bar
Actual result:
--------------
Warning: Wrong parameter count for nl2br() in
/var/www/superwayne.org/cron/- on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50403&edit=1