Re: Empty xpath nodelist raises foreach error.

From: Date: Wed, 03 Mar 2004 11:35:55 +0000
Subject: Re: Empty xpath nodelist raises foreach error.
References: 1  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-338@lists.php.net to get a copy of this message
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 (#338) next »