bkdotcom / PHPDebugConsole

Browser/javascript-like logger/console class for PHP
http://www.bradkent.com/php/debug
Other
78 stars 5 forks source link

get_defined_vars Error #19

Closed PwrSrg closed 4 years ago

PwrSrg commented 5 years ago

When I pass in get_defined_vars() I receive the following error: "Object of class bdk\Debug could not be converted to string"

bkdotcom commented 5 years ago

are you getting the error when doing something like the following?

$debug = new \bdk\Debug();

$foo = 'foo';
$bar = 'bar';
$debug->log('defined vars', get_defined_vars());
PwrSrg commented 5 years ago

Yes, that is correct.

$debug = new \bdk\Debug(array(
    'collect' => true,
    'output' => true,
));
$debug->info('Defined Vars', get_defined_vars());
bkdotcom commented 5 years ago

This has been fixed in the master branch (upcoming v2.3 release)

hopefully released soon (primarily working on documentation at this point)

give it a try if your able

Thanks!

(I'll close this issue when v2.3 is released)

bkdotcom commented 4 years ago

sorry for the delay.
2.3 is finally out
I hope to be more responsive with point-releases in the future