|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44291 nl2br issue
Submitted: 2008-02-29 12:07 UTC Modified: 2008-03-08 01:00 UTC
From: danil dot megrabjan at gmail dot com Assigned:
Status: No Feedback Package: Strings related
PHP Version: 5.2.5 OS: openSuSE-10.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-02-29 12:07 UTC] danil dot megrabjan at gmail dot com
I try to print some `print_r` string with nl2br.

Reproduce code:
$a = print_r($array, true);
echo nl2br($a);

Expected result:
nl to br converting in strings of each array element.

Actual result:
0xb768d4db in zif_nl2br (ht=1, return_value=0x80252ac4, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/INFIN/megrabjan/Downloads/php-5.2.5/ext/standard/string.c:3845
3845 if (*str == '\r') {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-29 12:32 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


Can you please give us the whole script in order to reproduce your code($array variable for instance)?


 [2008-03-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 13:01:30 2024 UTC