Code Comments
Programming Forum and web based access to our favorite programming groups.Smarty isn't meant to be executed statically, you should have an
instantiated object.
Ryan Kanno wrote:
>
> Thanks to all that responded. I spent yesterday debugging and here's
> what I found. If I override the 'fetch' function in my extended
> Smarty class, regardless of what's called within the function, I get
> the blank page with no error output. Here's what the fetch function
> looked like:
>
> public function fetch() {
> return Smarty::fetch(...);
> }
>
> If I comment that function out, then everything works as normal. I
> didn't run through the Smarty code yet, but is there something in
> Smarty that would account for this behavior?
>
> Thanks,
> Ryan
>
> ________________________________________
_________________________
> Is your PC infected? Get a FREE online computer virus scan from
> McAfeeŽ Security.
> http://clinic.mcafee.com/clinic/ibu...gn.asp?cid=3963
>
Post Follow-up to this message--- Monte Ohrt <monte@ispi.net> wrote: > Smarty isn't meant to be executed statically, you should have an > instantiated object. Hmm. If I'm not mistaken, in PHP4, $this (of the current object, in this case the extended object) would be in context during the Smarty::display(). It seems reasonable that this should continue to be the case for PHP5--is that not so? Still, I think that $this-> or parent:: are more appropriate here. Someone mentioned the constructor: I haven't tried this, so I ask: is it advisable to avoid __construct() when extending a class (like Smarty) that uses the PHP4 style class-named constructors? > Ryan Kanno wrote: > > here's > get > function >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.