Support

Home Forums Community Forum array_merge issue in EE 3.1.2

array_merge issue in EE 3.1.2

Posted: August 14, 2012 at 11:46 am

Viewing 1 reply thread


Amy

August 14, 2012 at 11:46 am

When the user clicks a link in a Payment Reminder e-mail, the following displayed on the page:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in […]/plugins/event-espresso.3.1.20.P/gateways/process_payments.php on line 30

I was able to fix the error thanks to some Drupal forums by changing line 30 from:

$payment_data = array_merge($payment_data, $temp_data);

to:

$payment_data = array_merge((array)$payment_data, (array)$temp_data);

I think the solution has to do with PHP5 vs PHP4. I know I am using an older version of EE as well, so perhaps this has been updated in the most recent version, but I wanted to post in case anyone else had this issue.

Can anyone see anything wrong with this fix?


Sidney Harrell

August 14, 2012 at 7:27 pm

It looks like it’s not pulling the row out of the database on line 29. Can you check if it’s getting an attendee_id into the function. It should be getting set by line 356 in includes/process_registration/payment_page.php:

$sql = "SELECT id FROM `" . EVENTS_ATTENDEE_TABLE . "` WHERE registration_id='" . espresso_return_reg_id() . "' ORDER BY id LIMIT 1";
    //echo $sql;
    $payment_data['attendee_id'] = $wpdb->get_var($sql);
Viewing 1 reply thread

The support post ‘array_merge issue in EE 3.1.2’ 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