From 7f31cf141099cbec5a6247f893727804965234af Mon Sep 17 00:00:00 2001 From: Donncha O Caoimh Date: Wed, 6 Oct 2004 13:10:52 +0000 Subject: [PATCH] Check if $uris is an array. git-svn-id: https://develop.svn.wordpress.org/trunk@1757 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c63b68cebd..eef24a7298 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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; }