Re: [PHP-XML-DEV] Empty xpath nodelist raises foreach error.
[email protected] ("Rob Richards") Wed, 3 Mar 2004 06:35:55 -0500
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
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