Edit report at http://bugs.php.net/bug.php?id=53737&edit=1
ID: 53737 User updated by: martin at veverka dot eu Reported by: martin at veverka dot eu Summary: segfault / php crash on nl2br(object) -Status: Feedback +Status: Closed Type: Bug Package: Strings related Operating System: gentoo 1.12.14, FreeBSD 8.0 PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Seems that the segfault is caused by the object itself, I will post more details as soon as i know something. Sorry for the misleading description. Previous Comments: ------------------------------------------------------------------------ [2011-01-13 15:58:20] cataphr...@php.net I can't reproduce: $ ~/php/php5.3-t/bin/php -r "echo nl2br(new mysqli);" Warning: nl2br() expects parameter 1 to be string, object given in Command line code on line 1 I also find no problem in nl2br (all pretty standard). Can you give more details? ------------------------------------------------------------------------ [2011-01-13 14:58:10] martin at veverka dot eu Description: ------------ Calling nl2br(any_object) causes segmentation fault and crashing php. Test script: --------------- <?php // any object echo nl2br(new mysqli()); Expected result: ---------------- fatal error is expected Catchable fatal error: Object of class mysqli could not be converted to string in - on line 3 Actual result: -------------- segfault and php crash dmesg shows this: [12476.986676] php-cgi[21195]: segfault at 3118 ip 00007ff86c5d6074 sp 00007fff1edd4e60 error 4 in php-cgi[7ff86c26f000+77e000] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53737&edit=1