Support

Home Forums Event Espresso Premium Excel Reports Still Failing

Excel Reports Still Failing

Posted: November 2, 2013 at 12:41 pm


Christine Doyle

November 2, 2013 at 12:41 pm

Previously, I was instructed to change line 501 of the export functions php file to correct an error generated because my version of PHP is a little out of date. I would upgrade, but we are in the middle of a major event and updates to the server are forbidden until we end the event. I updated with the suggested code:
$scanned_date_object = DateTime::__construct($participant->date_scanned);

However, this provides a new error in the exported excel function:
<b>Fatal error</b>: Non-static method DateTime::__construct() cannot be called statically in <b>/home4/ab45863/public_html/2013/wp-content/plugins/event-espresso/includes/functions/export.php</b> on line <b>501</b><br />

What do I need to do to correct this error so I can use the export reporting functions of event espresso?


Dean

November 4, 2013 at 4:56 am

Hi Ole,

Which exported file contains this information?

What version of Event Espresso are you using?

What version of PHP are you using? (You can check this via the System Status menu)


Christine Doyle

November 6, 2013 at 12:37 am

This is the link of the original ticket: https://eventespresso.com/topic/excel-report-of-attendees-provides-failure-error-in-exported-file/

Our PHP version has not changed.


Josh

  • Support Staff

November 6, 2013 at 10:29 am

Hi Ole,

Until they can make the date scanned feature of the export to be compatible with verisons of PHP that are lower than 5.3 (or until you can have your host upgrade the version of PHP), one way to work around the issue for now is to comment out the code starting on line 500 of export.php. It will look like this after it has been commented out:

/*if(!empty($participant->date_scanned)) {
	$scanned_date_object = DateTime::createFromFormat('Y-m-d H:i:s', $participant->date_scanned);
	$scanned_date = $scanned_date_object->format(get_option('date_format') . ' ' . get_option('time_format'));
} else { */
	$scanned_date = "";
/*} */

The support post ‘Excel Reports Still Failing’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso