WordPress.org

Ready to get started?Download WordPress

Forums

WP Email Capture
[resolved] Bug: Undefined variable: csv_output/file in exported CSV (2 posts)

  1. Ov3rfly
    Member
    Posted 9 months ago #

    With define('WP_DEBUG', true); in wp-config.php some errors can be observed in exported CSV file. Also the file has an incomplete name e.g. _2013-06-26_12-50.csv:

    Notice: Undefined variable: csv_output in /../wp-content/plugins/wp-email-capture/inc/exportcsv.php on line 15
    Notice: Undefined variable: file in /../wp-content/plugins/wp-email-capture/inc/exportcsv.php on line 37
    Name,E-Mail
    [...]

    Reason, variables are not yet defined before use.

    Wrong:

    $csv_output .= __('Name','WPEC').",".__('Email','WPEC');
    [...]
    $filename = $file."_".date("Y-m-d_H-i",time());

    Suggested fixes:

    $csv_output = __('Name','WPEC').",".__('Email','WPEC');
    [...]
    $file = 'WP_Email_Capture';
    $filename = $file."_".date("Y-m-d_H-i",time());

    Edit: Won't start an own thread for this, a similar error is e.g. in file inc/display.php in line 52 where $display .= "<div.. should be $display = "<div.., it is shown if the shortcode is used.

    http://wordpress.org/extend/plugins/wp-email-capture/

  2. Rhys Wynne
    Member
    Plugin Author

    Posted 9 months ago #

    Resolved as it's been updated in 2.7.7

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.