Fix bad incrementor in widgets. Props mdawaffe. fixes #6350

git-svn-id: https://develop.svn.wordpress.org/trunk@7469 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-22 08:17:37 +00:00
parent e31076e464
commit e9f8e71210
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
if ( $is_multi ) {
// it's a multi-widget. We only need to show it in the list once.
$already_shown[] = $widget['callback'];
$num = array_pop( explode( '-', $widget['id'] ) );
$num = (int) array_pop( explode( '-', $widget['id'] ) );
$id_base = $wp_registered_widget_controls[$widget['id']]['id_base'];
// so that we always add a new one when clicking "add"
while ( isset($wp_registered_widgets["$id_base-$num"]) )