Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2010 09:06:27 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1551 - also safeguarded all foreach loops with an array typecast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r2550 r2576  
    804804    <?php if ( $admins ) { ?>
    805805        <ul id="admins-list" class="item-list<?php if ( $admin_list ) { ?> single-line<?php } ?>">
    806         <?php foreach ( $admins as $admin ) { ?>
     806        <?php foreach ( (array)$admins as $admin ) { ?>
    807807            <?php if ( $admin_list ) { ?>
    808808            <li>
     
    842842        <?php if ( $group_mods ) { ?>
    843843            <ul id="mods-list" class="item-list<?php if ( $admin_list ) { ?> single-line<?php } ?>">
    844             <?php foreach ( $group_mods as $mod ) { ?>
     844            <?php foreach ( (array)$group_mods as $mod ) { ?>
    845845                <?php if ( $admin_list ) { ?>
    846846                <li>
     
    15101510    $counter = 1;
    15111511
    1512     foreach ( $bp->groups->group_creation_steps as $slug => $step ) {
     1512    foreach ( (array)$bp->groups->group_creation_steps as $slug => $step ) {
    15131513        $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?>
    15141514
     
    15731573        $found = true;
    15741574
    1575         foreach ( $step_slugs as $step_slug ) {
     1575        foreach ( (array)$step_slugs as $step_slug ) {
    15761576            if ( !in_array( $step_slug, $bp->groups->completed_create_steps ) )
    15771577                $found = false;
     
    15971597
    15981598    /* Get previous steps */
    1599     foreach ( $bp->groups->group_creation_steps as $slug => $name ) {
     1599    foreach ( (array)$bp->groups->group_creation_steps as $slug => $name ) {
    16001600        if ( $slug == $step_slug )
    16011601            break;
     
    16751675        global $bp;
    16761676
    1677         foreach ( $bp->groups->group_creation_steps as $slug => $name ) {
     1677        foreach ( (array)$bp->groups->group_creation_steps as $slug => $name ) {
    16781678            if ( $slug == $bp->action_variables[1] )
    16791679                break;
Note: See TracChangeset for help on using the changeset viewer.