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 c987e5b013
commit acbf2b46da

View File

@ -379,7 +379,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))
{