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:
Donncha O Caoimh 2004-10-06 13:10:52 +00:00
parent 5802a33673
commit 7f31cf1410
1 changed files with 6 additions and 3 deletions

View File

@ -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;
}