Re: Empty xpath nodelist raises foreach error.

From: Date: Wed, 03 Mar 2004 11:44:59 +0000
Subject: Re: Empty xpath nodelist raises foreach error.
References: 1 2  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-339@lists.php.net to get a copy of this message
I'm using the snap from this morning (php5-200403030830). I don't get any errors, just the warning. Philip Rob Richards wrote: > From: Philip Fletcher > > >> When using foreach() with an xpath query, if the xpath result is an empty >> set, then foreach raises a 'Warning: Invalid argument supplied for >> foreach()' message. This should not really be raised, as (for foreach()) >> the xpath return should be a valid (but empty) > > Are you using recent snap? This issue was fixed not too long ago. There > are a couple cases where it wont return an nodelist (issues errors in that > case though). > > Rob

« previous php.xml.dev (#339) next »