fix for expected parameter for data must be an array in set_timer, when starting async testjob; handling array as adr in send when creating messages

This commit is contained in:
Klaus Leithoff 2010-09-13 08:41:04 +00:00
parent b02f830128
commit 553152fc80
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ class uiasyncservice
{ {
echo '<p><b>'.lang("You have no email address for your user set !!!")."</b></p>\n"; echo '<p><b>'.lang("You have no email address for your user set !!!")."</b></p>\n";
} }
elseif (!$async->set_timer($times,'test','admin.uiasyncservice.test',$GLOBALS['egw_info']['user']['email'])) elseif (!$async->set_timer($times,'test','admin.uiasyncservice.test',(array)$GLOBALS['egw_info']['user']['email']))
{ {
echo '<p><b>'.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."</b></p>\n"; echo '<p><b>'.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."</b></p>\n";
} }

View File

@ -213,14 +213,14 @@
{ {
if ($$adr) if ($$adr)
{ {
if (preg_match_all('/"?(.+)"?<(.+)>,?/',$$adr,$matches)) if (is_string($$adr) && preg_match_all('/"?(.+)"?<(.+)>,?/',$$adr,$matches))
{ {
$names = $matches[1]; $names = $matches[1];
$addresses = $matches[2]; $addresses = $matches[2];
} }
else else
{ {
$addresses = explode(',',trim($$adr)); $addresses = (is_string($$adr) ? explode(',',trim($$adr)) : explode(',',trim($$adr[0])));
$names = array(); $names = array();
} }
$method = 'Add'.($adr == 'to' ? 'Address' : $adr); $method = 'Add'.($adr == 'to' ? 'Address' : $adr);