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

From: Date: Tue, 23 Jul 2002 23:35:02 +0000
Subject: Re: [SMARTY-DEV] Debug console problem (and solution) - objects handled incorrectly
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-220@lists.php.net to get a copy of this message
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 (#220) next »