Index: bp-core/bp-core-functions.php
===================================================================
--- bp-core/bp-core-functions.php	(revision 4918)
+++ bp-core/bp-core-functions.php	(working copy)
@@ -92,6 +92,11 @@ function bp_core_get_page_meta() {
 		}
   	}
 
+	foreach( $page_ids as $component_name => $page_id ) {
+		if ( empty( $component_name ) || empty( $page_id ) )
+			unset( $page_ids[$component_name] );
+	}
+
 	return apply_filters( 'bp_core_get_page_meta', $page_ids );
 }
 
@@ -121,11 +126,11 @@ function bp_core_update_page_meta( $blog_page_ids ) {
 function bp_core_get_page_names() {
 	global $wpdb, $bp;
 
-	// Set pages as standard class
-	$pages = new stdClass;
-
 	// Get pages and IDs
 	if ( $page_ids = bp_core_get_page_meta() ) {
+		
+		// Set pages as standard class
+		$pages = new stdClass;
 
 		$posts_table_name = bp_is_multiblog_mode() ? $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts' : $wpdb->posts;
 		$page_ids_sql     = implode( ',', (array)$page_ids );
@@ -1068,9 +1073,9 @@ function bp_core_add_root_component( $slug ) {
 
 	if ( empty( $bp->pages ) )
 		$bp->pages = bp_core_get_page_names();
-
+		
 	$match = false;
-
+	
 	// Check if the slug is registered in the $bp->pages global
 	foreach ( (array)$bp->pages as $key => $page ) {
 		if ( $key == $slug || $page->slug == $slug )
