Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Bug #4605 debug_print_backtrace - Object to string conversion
Submitted: 2005-06-16 13:31 UTC
From: lists at co-comp dot co dot uk Assigned: aidan
Status: Closed Package: PHP_Compat
PHP Version: 4.3.11 OS: Linux FC3
Roadmaps: 1.6.0a1    
Subscription  


 [2005-06-16 13:31 UTC] lists at co-comp dot co dot uk
Description: ------------ I use a db_die function which calls debug_print_backtrace(). Essentially, debug_print_backtrace() is trying to implode an object and gives an object to string conversion error. Also, debug_print_backtrace2() is what's defined and checked for - had to change it to debug_print_backtrace() to get it to work :-/ ymmv pear list shows: PHP_Compat 1.4.0 stable Reproduce code: --------------- -if (!function_exists('debug_print_backtrace2')) { - function debug_print_backtrace2() +if (!function_exists('debug_print_backtrace')) { + function debug_print_backtrace() if (isset($call['args'])) { $params = implode(', ', $call['args']); //<== this line causes the problem } Expected result: ---------------- PHP 5.0.4 #0 db_die(ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql, etc Actual result: -------------- PHP 4.3.11 Notice: Object to string conversion in /usr/share/pear/PHP/Compat/Function/debug_print_backtrace.php on line 53 #0 db_die() called etc

Comments

 [2005-06-16 13:40 UTC] lists at co-comp dot co dot uk
Looks like the backtrace2 thing was fixed in the cvs version - it's just not in the 'stable' released version!! http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/debug_print_backtrace.php?r1=1.1&r2=1.2&ty=u Rest of bug report is still an issue though :)
 [2005-06-18 08:33 UTC] aidan
I'll release a new version soon!