Fix: travis-ci error actions_sendmails.inc.php

error line="124""The use of function sizeof() is forbidden; use count() instead"
error line="229" "The use of function sizeof() is forbidden; use count() instead"
This commit is contained in:
Niklas Spanring 2015-08-26 15:04:50 +02:00
parent 99e679ec39
commit 2f08ddef54

View File

@ -121,7 +121,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
{ {
setEventMessage($langs->trans('ErrorFailedToFindSocieteRecord',$_POST['sendto']),'errors'); setEventMessage($langs->trans('ErrorFailedToFindSocieteRecord',$_POST['sendto']),'errors');
} }
elseif (sizeof($possibleaccounts)>1) elseif (count($possibleaccounts)>1)
{ {
$sendtosocid=$possibleaccounts[1]['id']; $sendtosocid=$possibleaccounts[1]['id'];
$result=$object->fetch($sendtosocid); $result=$object->fetch($sendtosocid);
@ -226,7 +226,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if($conf->dolimail->enabled) if($conf->dolimail->enabled)
{ {
$mailfromid = explode ("#", $_POST['frommail'],3); $mailfromid = explode ("#", $_POST['frommail'],3);
if (sizeof($mailfromid)==0) $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; if (count($mailfromid)==0) $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
else else
{ {
$mbid = $mailfromid[1]; $mbid = $mailfromid[1];