[Phpslash-devel] Re: Odd Problems with Comments
Brought to you by:
joestewart,
nhruby
From: Matthew L. <lei...@ma...> - 2003-10-22 16:58:58
|
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 lei...@ma... |