Support

Home Forums Event Espresso Premium Ticket error with multiple question groups

Ticket error with multiple question groups

Posted: August 3, 2013 at 3:29 pm


Rob Mougey

August 3, 2013 at 3:29 pm

I just upgraded to 3.1.34.P and am getting this error when I try to view a ticket for a user who has registered for multiple events, which combined have more than one question group:

Notice: Array to string conversion in .../wp-content/plugins/espresso-ticketing/functions.php on line 403

The problem is at line 397 where it tries to add search/replace values for event metadata:

foreach($data->event->event_meta as $k=>$v){
array_push($SearchValues,"[".$k."]");
array_push($ReplaceValues,stripslashes_deep($v));
}

In my case $data->event->event_meta->add_attendee_question_groups is not a string, it is an array with two question groups:

Array
(
[default_payment_status] =>
[venue_id] => 1
[additional_attendee_reg_info] => 3
[add_attendee_question_groups] => Array
(
[1] => 1
[3] => 3
)
[date_submitted] => July 13, 2013
[event_hashtag] =>
[event_format] =>
[event_livestreamed] =>
[] =>
)


Sidney Harrell

August 5, 2013 at 11:59 am

Created developer ticket to have it fixed in future version. Changing it to:

if (!empty($data->event->event_meta)){
		foreach($data->event->event_meta as $k=>$v){
			if (is_string($v)) {
				array_push($SearchValues,"[".$k."]");
				array_push($ReplaceValues,stripslashes_deep($v));
			}
		}
	}


Rob Mougey

August 12, 2013 at 8:46 am

Thanks, that will get around the error.

Maybe we can get a wish-list item to fix things so those array values become available for replacement into the ticket instead of just skipped.


Dean

August 13, 2013 at 3:04 am

Thanks for the feedback Rob, I’ll make a note of that on the developer ticket.

The support post ‘Ticket error with multiple question groups’ 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