AW: [SMARTY-DEV] Debug console problem (and solution) - objects handled incorrectly
| From: | Rainer Collet | Date: | Wed, 24 Jul 2002 10:36:45 +0000 |
| Subject: | AW: [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-221@lists.php.net to get a copy of this message | ||
i've already mentioned this a very long time ago, but nobody seemed to be
interested. since last smarty release i use my own
modifier.debug_print_var.php in a second (custom) plugin-dir ;-)
rainer
> 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 ;)
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>