Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2010 09:06:27 PM (16 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-core/bp-core-signup.php

    r2493 r2576  
    8787                /* Add any errors to the action for the field in the template for display. */
    8888                if ( !empty( $bp->signup->errors ) ) {
    89                         foreach ( $bp->signup->errors as $fieldname => $error_message )
     89                        foreach ( (array)$bp->signup->errors as $fieldname => $error_message )
    9090                                add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo "<div class=\"error\">' . $error_message . '</div>";' ) );
    9191                } else {
     
    208208                        $profile_field_ids = explode( ',', $usermeta['profile_field_ids'] );
    209209
    210                         foreach( $profile_field_ids as $field_id ) {
     210                        foreach( (array)$profile_field_ids as $field_id ) {
    211211                                $current_field = $usermeta["field_{$field_id}"];
    212212
Note: See TracChangeset for help on using the changeset viewer.