Check if $uris is an array.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
donncha 2004-10-06 13:10:52 +00:00
parent 4f0449f79b
commit d1d02a30bb

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