WordPress.org

Ready to get started?Download WordPress

Forums

Export User Data
[resolved] Error: Invalid argument supplied for foreach() on line 183 (4 posts)

  1. skyadd
    Member
    Posted 6 months ago #

    This displayed on the first row of the exported table file:

    <b>Warning</b>: Invalid argument supplied for foreach() in <b>...\wp-content\plugins\export-user-data\export-user-data.php</b> on line <b>183</b>

    All data appears to have exported successfully. Any need for concern?

    http://wordpress.org/plugins/export-user-data/

  2. Becky Melton
    Member
    Posted 6 months ago #

    Same here ... Error message in the first 2 lines of the exported spreadsheet.
    Any solution for this?

  3. qstudio
    Member
    Plugin Author

    Posted 6 months ago #

    if ( $usermeta && is_array($usermeta) ) {
      foreach( $usermeta as $field ) {
        $usermeta_fields[] = $field;
      }
    }

    Line 183 expects $usermeta to include an array of values - I presume you selected no usermeta fields - this is a bug in the plugin, but this fix should sort it - FYI - I've not tested this yet.. but will and if it's good, I'll release an update.

    Q

  4. qstudio
    Member
    Plugin Author

    Posted 6 months ago #

    I could not replicate this error, however I've released an update to the plugin which should address the problem.

    I would also strongly advice that you set-up your wp_debugging to log to a file - as described here: http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.