civicrm/civicrm-core — pull request #1537 by pratik-joshi (2013-08-29 08:32:47+00:00)
Title: CRM-13248 fix

The issue :
Payment prams mapping doesn't properly map 'email' field, this is because : during payment params mapping _blID (billing loc type id) is passed in mapParams() function, but the email field provided in the event registration profiles can be of different location type other than billing, so the passed email field value is not maaped.

These payment params are eventually used for authorize net payment and causes 'email is required' processor error.

The fix :
After the mapping checked if the mapping is done for email payment param, if its not done, get the first email field value provided in profile and pass map that value to payment param

for this introduced a crm_utils_array function which searches the value WRT key regex passed as argument