We discussed this in this thread, but I'm starting a new one for clarification.
This seems to be a problem with setting $wpdb variables when using switch_to_blog() on WPMU2.6. Example output (the base code worked on every previous iteration of WPMU:
$blogs = get_last_updated();
foreach ($blogs as $next_blog) {
switch_to_blog($next_blog['blog_id']);
$latest->blog_link = get_bloginfo('url');
$latest->blog_name = get_bloginfo('name');
/* a bunch of other commented out stuff */
$posts[] = $latest;
restore_current_blog();
}
If you change $posts[] = $latest
to $posts = $blog_id
, you get:
Array
(
[0] => 1
[1] => 11
[2] => 4
[3] => 6
[4] => 5
)
But if you just echo what its supposed to output, you get:
Array
(
[0] => stdClass Object
(
[blog_link] => http://holisticnetworking.net/design
[blog_name] => The HN Design Studio
)
[1] => stdClass Object
(
[blog_link] => http://holisticnetworking.net/design
[blog_name] => The HN Design Studio
)
[2] => stdClass Object
(
[blog_link] => http://holisticnetworking.net/design
[blog_name] => The HN Design Studio
)
[3] => stdClass Object
(
[blog_link] => http://holisticnetworking.net/design
[blog_name] => The HN Design Studio
)
[4] => stdClass Object
(
[blog_link] => http://holisticnetworking.net/design
[blog_name] => The HN Design Studio
)
)
So, switch_to_blog appears to not be switching up the necessary variables in $wpdb, unless I've missed something?