mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Check for empty(), not !is_array(), when trying to determine if wpdb::get_results() returned results. See #10607
git-svn-id: http://svn.automattic.com/wordpress/trunk@13681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
03eac5614c
commit
9492517abd
@ -29,7 +29,10 @@ switch ( $action ) {
|
||||
}
|
||||
|
||||
$blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
|
||||
if ( is_array( $blogs ) ) {
|
||||
if ( empty( $blogs ) ) {
|
||||
echo '<p>' . __( 'All done!' ) . '</p>';
|
||||
break;
|
||||
}
|
||||
echo "<ul>";
|
||||
foreach ( (array) $blogs as $details ) {
|
||||
if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
|
||||
@ -52,9 +55,6 @@ switch ( $action ) {
|
||||
setTimeout( "nextpage()", 250 );
|
||||
//-->
|
||||
</script><?php
|
||||
} else {
|
||||
echo '<p>'.__('All Done!').'</p>';
|
||||
}
|
||||
break;
|
||||
case 'show':
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user