From c790c1af248ca2467fe133b920a83dc8686d58b6 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 11 Jul 2006 15:31:50 +0000 Subject: Check that $pages is an array. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@654 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wpmu-settings.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wpmu-settings.php') diff --git a/wpmu-settings.php b/wpmu-settings.php index c5f58c6..58620ae 100644 --- a/wpmu-settings.php +++ b/wpmu-settings.php @@ -86,6 +86,10 @@ function is_blogname_page( $blogname ) { // is the request for a page of the main blog? We need to cache this information somewhere to save a request $pages = $wpdb->get_col( "SELECT post_name FROM {$table_prefix}1_posts WHERE post_type='page'" ); + + if( is_array( $pages ) == false ) + return false; + if( in_array( $blogname, $pages ) ) { return true; } else { -- cgit