Re: Very minor debugging suggestion for lib.resources.php

Joe Stewart <[email protected]> Thu, 10 Jul 2003 10:32:47 +0200
Newsgroups gmane.comp.cms.phpslash.devel
Message-ID <[email protected]>
On Thu, Jul 10, 2003 at 10:57:39AM -0400, Mike Gifford wrote:
> Howdy,
> 
> in lib.resources.php, the function pslNew could be slightly easier to
> debug in the future if the declared classes could be output more easily:
> 
>    else {
>       // print_r(get_declared_classes());
>       pslError("No such class: $class");
>       return false;
>    }
> 
> I was trying to figure out why the heck pslNew wasn't working for a new
> class I was developing and finally figured out that I hadn't quite
> changed the class name correctly....  
> 
> You can't pass arrays to the debug function very well..  I suppose you
> could serialize them so 
> 	debug('List of classes',serialize(get_declared_classes()));
> 
> In anycase just a thought..
> 

Hey Mike,

debug() should have no trouble outputting arrays.  This works fine for me:

	debug("declared_classes", get_declared_classes());

What is the value of debug.max_recursion_level in config.ini?

	debug.max_recursion_level = 10

If you add a test like this do you get the full array displayed?

	debug("_PSL", $_PSL);

Joe

> Mike
> -- 
> Mike Gifford, OpenConcept Consulting
> Free Software for Social Change -> http://www.openconcept.ca
> Featured Client: CUPE National -> http://www.cupe.ca
> Whoever controls the media-the images-controls the culture - A. Ginsberg
> 


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps