Changeset 4933
- Timestamp:
- 08/06/2011 12:39:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r4927 r4933 93 93 } 94 94 95 foreach( (array)$page_ids as $component_name => $page_id ) { 96 if ( empty( $component_name ) || empty( $page_id ) ) { 97 unset( $page_ids[$component_name] ); 95 // Ensure that empty indexes are unset. Should only matter in edge cases 96 if ( $page_ids && is_array( $page_ids ) ) { 97 foreach( (array)$page_ids as $component_name => $page_id ) { 98 if ( empty( $component_name ) || empty( $page_id ) ) { 99 unset( $page_ids[$component_name] ); 100 } 98 101 } 99 102 } … … 127 130 function bp_core_get_directory_pages() { 128 131 global $wpdb, $bp; 132 133 // Set pages as standard class 134 $pages = new stdClass; 129 135 130 136 // Get pages and IDs 131 137 if ( $page_ids = bp_core_get_directory_page_ids() ) { 132 133 // Set pages as standard class134 $pages = new stdClass;135 138 136 139 $posts_table_name = bp_is_multiblog_mode() ? $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts' : $wpdb->posts;
Note: See TracChangeset
for help on using the changeset viewer.