Check if $uris is an array.
git-svn-id: https://develop.svn.wordpress.org/trunk@1757 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5802a33673
commit
7f31cf1410
|
@ -1250,9 +1250,12 @@ function page_rewrite_rules() {
|
|||
$uris = get_settings('page_uris');
|
||||
|
||||
$rewrite_rules = array();
|
||||
foreach ($uris as $uri => $pagename) {
|
||||
$rewrite_rules += array($uri . '/?$' => "index.php?pagename=$pagename");
|
||||
}
|
||||
if( is_array( $uris ) )
|
||||
{
|
||||
foreach ($uris as $uri => $pagename) {
|
||||
$rewrite_rules += array($uri . '/?$' => "index.php?pagename=$pagename");
|
||||
}
|
||||
}
|
||||
|
||||
return $rewrite_rules;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue