Re: Flakey use of debug config

Lukas Kahwe Smith <[email protected]> Sun, 30 Oct 2005 13:30:10 +0100
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Dan Rossi wrote:
> I updated LiveUser the other day and had to change a few things around 
> to make it work,  a public method of addErrorLog got removed. I 
> eventually worked out you have to turn on debug for the $admin->log 
> object to not be null so these errors wont occur
> 
> Fatal error: Call to a member function addChild() on a non-object in
> 
> with this $this->admin->log->addChild($logger);

always a good idea to read the changelog first :-)

> so you have to comment and uncomment that when turning debug on and off.

yes .. or use an if ..

> I now get a log window popping up, when i just want it to log to a file 
> like it used to , and i also get this error when loading the login page 
> for the first time, as in not a protected area which is redirecting to 
> the login

alternatively you can pass an instance of a logger inside the $debug 
parameter. FYI: the default log instance we create does add the win 
logger child.

> An undefined error occurred or init() was not called
> 
> Once i login i get that annoying log window with the error of "unknown 
> error" :D whats the go ?

you lost me now .. only errors should cause this, so I presume you have 
an error to fix in your setup.

regards,
Lukas