Re: [SMARTY-DEV] Debug console problem (and solution) - objects handled incorrectly

From: Date: Wed, 24 Jul 2002 13:22:26 +0000
Subject: Re: [SMARTY-DEV] Debug console problem (and solution) - objects handled incorrectly
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-222@lists.php.net to get a copy of this message
Your changes are committed to CVS. Simon Willison wrote:
At 00:28 24/07/2002 +0100, Simon Willison wrote:
I recently ran in to a problem with the Smarty debugging console falling over when faced with a template that has objects assigned as variables. I've updated the modifier.debug_print_var.php to allow for objects as well as arrays, and the replacement file is attached to this email.
And I've just thought of an improvement. Replace the following line: $results = "<b>Object (".count($object_vars).")</b>"; With this: $results = "<b>".get_class($var)." Object (".count($object_vars).")</b>"; And the debugging console will show the class name of the object. Promise to stop spamming the list now ;)


« previous php.smarty.dev (#222) next »