WordPress.org

Ready to get started?Download WordPress

Forums

WP Users Exporter
Error: Invalid argument supplied for... (4 posts)

  1. Okoth1
    Member
    Posted 1 year ago #

    This error appears in the csv exported file:

    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/xxx/public_html/xxx/wp-content/plugins/wp-users-exporter/A_UserExporter.class.php</b> on line <b>92</b><br />

    Line 92 is

    foreach ($user as $key => $value) {
                    $user->$key = str_replace('||BR||', '\n', $value);
                }

    I changed it into this and the error is gone.

    if (is_array($user)) {
                foreach ($user as $key => $value) {
                    $user->$key = str_replace('||BR||', '\n', $value);
                }
    			}

    http://wordpress.org/extend/plugins/wp-users-exporter/

  2. joshuaiz
    Member
    Posted 1 year ago #

    Thanks for this. You would think the plugin would be updated.

  3. toto
    Member
    Posted 1 year ago #

    Will have an update for the plugin and when?

  4. Tony Wips
    Member
    Posted 1 year ago #

    @Okoth1
    "if (is_array($user))"
    will always fail because $user is NOT an array but an object, so the inside code will be never executed.

    The main problem with the plugin is that it doesn't print the header for the html and xls formats for problems with utf decode function.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.