The MU forums have moved to WordPress.org

Error when updating profile (11 posts)

  1. JoeMac
    Member
    Posted 17 years ago #

    Ok first problem solved after a little digging. Now when I go into my profile - or anyone goes into their profiles - they can update them, but they get this message:

    Warning: Invalid argument supplied for foreach() in /hsphere/local/home/joemac/sportsdayblogs.com/wp-inst/wp-admin/profile-update.php on line 13

    Any suggestions on how to get rid of that?

  2. JoeMac
    Member
    Posted 17 years ago #

    Any help, it seems that all the tester on the site are getting that.

    Here is the coding:

    <?php

    require_once('admin.php');

    check_admin_referer();

    if ( !$_POST )
    die( __('No post?') );

    $errors = edit_user($user_ID);

    if (count($errors) != 0) {
    foreach ($errors as $id => $error) {
    echo $error . '<br/>';
    }
    exit;
    }

    if ( !isset( $_POST['rich_editing'] ) )
    $_POST['rich_editing'] = 'false';
    update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );

    do_action('personal_options_update');

    if ( 'profile' == $_POST['from'] )
    $to = 'profile.php?updated=true';
    else
    $to = 'profile.php?updated=true';

    wp_redirect( $to );
    exit;

    ?>

    Thanks in advance.

  3. JoeMac
    Member
    Posted 17 years ago #

    Ok I fixed this when taking out the bad text.

  4. frankpereiro
    Member
    Posted 17 years ago #

    What is the bad text?

    I have the very same problem

  5. JoeMac
    Member
    Posted 17 years ago #

    if (count($errors) != 0) {
    foreach ($errors as $id => $error) {
    echo $error . '<br/>';
    }
    exit;
    }

  6. frankpereiro
    Member
    Posted 17 years ago #

    I don't get it. That's the same code I have in my file. What needs to be changed?

  7. agabird
    Member
    Posted 17 years ago #

    I have the same error, and I don't understand what has to be changed ...

  8. frankpereiro
    Member
    Posted 17 years ago #

    I have just noticed that everytime I try to update anything I get errors as such:

    Fatal error: Cannot redeclare wpmu_delete_blog() (previously declared in /home/frankper/public_html/wp-inst/wp-admin/wpmu-edit.php:6) in /home/frankper/public_html/wp-inst/wp-admin/admin-db.php on line 489

    Any fixes?

  9. JoeMac
    Member
    Posted 17 years ago #

    Take that code out and you will fine.

  10. frankpereiro
    Member
    Posted 17 years ago #

    Oh, I see now.

    Thank you very much for your help

  11. agabird
    Member
    Posted 17 years ago #

    That's not a real sollution.

    Try filling in no e-mail adres. There should be an error message when submitting. By taking that part code out, it just says : "updated profile", withouth really changing the e-mail adres at all.

About this Topic