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

  1. Ov3rfly
    Posted 2 years 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

    Reason, variables are not yet defined before use.


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


  2. Rhys Wynne
    Volunteer Moderator
    Plugin Author

    Posted 2 years ago #

    Resolved as it's been updated in 2.7.7

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Email Capture
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.