Re: Odd Problems with Comments

Matthew Leingang <leingang-c2Vpf+SSmYbWs/[email protected]> Wed, 22 Oct 2003 12:57:59 -0400
Newsgroups gmane.comp.cms.phpslash.devel
Organization Harvard University Department of Mathematics
Message-ID <[email protected]>
On Wed, 2003-10-22 at 12:24, Mike Gifford wrote:
> Hi Matthew,
> 
> the (array) function changed, but didn't resolve the problem with
> lib.resources.php
> 
> > > > This refers to the following foreach in the
> > > lib.resources.php
> > > > >
> > > > > >       foreach($requirements as $req) {
> > > > You might could change this to
> > > >           foreach((array)$requirements as $req) {
> > 
> > Made the change as outlined and get the warning shown below:-
> > ===================
> > Warning: in_array() [function.in-array]: Wrong datatype for second
> > argument in /home/harbour/class/lib.resources.php on line 349
> > 
> > Warning: load_resource(Array) [function.load-resource]: failed to create
> > stream: No such file or directory in /home/harbour/class/lib.resources.php
> > on line 350
> > 
> > Warning: load_resource() [function.load-resource]: Failed opening 'Array'
> > for inclusion (include_path='.:/usr/local/apache/php/lib/php') in
> > /home/harbour/class/lib.resources.php on line 350
> > ====================

I'm guessing we're referring to this block here:

 $includedFiles = get_included_files();
	    if (!in_array($req,$includedFiles)) { // line 349
	       if (!include_once($req)) { // line 350
		  pslError("Include failed: $req.");
		  $success = false;
	       }
	       else {
		  // debug($fs,"$req successfully loaded");
	       }

The first warning is about $includedFiles not being the right datatype. 
Why would that not be an array?  Is get_included_files not working?

As for the third, it looks like $req is an array.  Why would that
happen?  Not sure how that happened, either.

What does a dump of $_PSL['resources'] look like?

Sorry no help yet.

--Matt

-- 
Matthew Leingang
Harvard University Department of Mathematics
leingang-c2Vpf+SSmYbWs/[email protected]



-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54