note 77925 added to control-structures.foreach
| From: | tklee1975 at gmail dot com | Date: | Thu, 20 Sep 2007 03:36:42 +0000 |
| Subject: | note 77925 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130619@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 58.65.236.81
Probable Submitter: 210.17.159.225
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- https://master.php.net/note/edit/77925
Del: integrated -- https://master.php.net/note/delete/77925/integrated
Del: useless -- https://master.php.net/note/delete/77925/useless
Del: bad code -- https://master.php.net/note/delete/77925/bad+code
Del: spam -- https://master.php.net/note/delete/77925/spam
Del: non-english -- https://master.php.net/note/delete/77925/non-english
Del: in docs -- https://master.php.net/note/delete/77925/in+docs
Del: other reasons-- https://master.php.net/note/delete/77925
Reject -- https://master.php.net/note/reject/77925
Search -- https://master.php.net/manage/user-notes.php