Prevent "Parameter must be scalar" error when creating a calendar event - thanks @sbourget

This commit is contained in:
nathangray 2016-07-25 15:06:20 -06:00
parent c55beb9037
commit 408726b647

View File

@ -367,7 +367,13 @@ class calendar_uiforms extends calendar_ui
break;
case 'participant':
foreach($data as $participant)
{ // email or rfc822 addresse (eg. "Ralf Becker <ralf@domain.com>")
{
if (is_null($participant))
{
continue;
}
// email or rfc822 addresse (eg. "Ralf Becker <ralf@domain.com>")
$email = array();
if(preg_match('/^(.*<)?([a-z0-9_.-]+@[a-z0-9_.-]{5,})>?$/i',$participant,$email))
{