WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/20/2008 05:08:31 PM (12 years ago)
Author:
westi
Message:

Fix a possible fatal error on the dashboard. Fixes #6833 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/index.php

    r8133 r8141  
    116116$ct = current_theme_info();
    117117$sidebars_widgets = wp_get_sidebars_widgets();
    118 $num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ) );
     118$num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ), 0 );
    119119$widgets_text = sprintf( __ngettext( '%d widget', '%d widgets', $num_widgets ), $num_widgets );
    120120if ( $can_switch_themes = current_user_can( 'switch_themes' ) )
Note: See TracChangeset for help on using the changeset viewer.