note 77925 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Wed, 28 May 2008 12:52:58 +0000 |
| Subject: | note 77925 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139937@lists.php.net to get a copy of this message | ||
Note Submitter: tklee1975 at gmail dot com
----
A fix in Wordpress.
In the wordpress source "wp-includes/classes.php",
The following may give a warning if "$rewrite" is not an proper associate array.
[Code]
// Look for matches.
$request_match = $request;
foreach ($rewrite as $match => $query) {
.............
............
}
[/Code]
This is a short-cut solution:
Change "foreach ($rewrite as $match => $query) {"
to "while (list($match, $query) = @each($rewrite))"
So that the non-array $rewrite warning can be ignored.