Support » Plugin: WP Users Exporter » Error: Invalid argument supplied for…

  • 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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for this. You would think the plugin would be updated.

    Will have an update for the plugin and when?

    Tony Wips

    (@tonywips)

    @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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error: Invalid argument supplied for…’ is closed to new replies.