From d1d02a30bbd743e0ed07b4e99d33e8da1f783086 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 6 Oct 2004 13:10:52 +0000 Subject: [PATCH] Check if $uris is an array. git-svn-id: http://svn.automattic.com/wordpress/trunk@1757 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 c63b68ceb..eef24a729 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; }