diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index ad621f45041..be75149de77 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -164,6 +164,7 @@ $usercancreate = $user->hasRight('agenda', 'allactions', 'create') || (($object- $listUserAssignedUpdated = false; $listResourceAssignedUpdated = false; +$assignedtouser = array(); // Remove user to assigned list if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')) { diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index 0adc9dac87f..912e725e91d 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -152,7 +152,11 @@ if (($massaction == "delete" || ($action == 'delete' && $confirm == 'yes')) && $ } $objectclass = 'BonPrelevement'; $objectlabel = 'BonPrelevement'; -$uploaddir = $conf->prelevement->dir_output; +if ($type == 'bank-transfer') { + $uploaddir = $conf->paymentbybanktransfer->dir_output; +} else { + $uploaddir = $conf->prelevement->dir_output; +} include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; /* diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 735dcbf76e8..ab1fa81adc1 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -2064,7 +2064,7 @@ class CMailFile $ret = ''; - $arrayaddress = explode(',', $address); + $arrayaddress = (!empty($address) ? explode(',', $address) : array()); // Boucle sur chaque composant de l'address $i = 0; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d71a9f02144..69f2def0906 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9938,7 +9938,7 @@ class Form } else { // Generic case to show photos // TODO Implement this method in previous objects so we can always use this generic method. - if (method_exists($object, 'getDataToShowPhoto')) { + if ($modulepart != "unknown" && method_exists($object, 'getDataToShowPhoto')) { $tmpdata = $object->getDataToShowPhoto($modulepart, $imagesize); $dir = $tmpdata['dir']; diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index ed1413beb21..d951f81cd15 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -201,10 +201,10 @@ class modGeneratePassPerso extends ModeleGenPassword $this->initAll(); // For the case this method is called alone - $password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY); - $maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY); - $num = preg_split('//u', $this->Nb, null, PREG_SPLIT_NO_EMPTY); - $spe = preg_split('//u', $this->Spe, null, PREG_SPLIT_NO_EMPTY); + $password_a = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY); + $maj = preg_split('//u', $this->Maj, 0, PREG_SPLIT_NO_EMPTY); + $num = preg_split('//u', $this->Nb, 0, PREG_SPLIT_NO_EMPTY); + $spe = preg_split('//u', $this->Spe, 0, PREG_SPLIT_NO_EMPTY); /* $password_a = str_split($password); $maj = str_split($this->Maj); @@ -259,7 +259,7 @@ class modGeneratePassPerso extends ModeleGenPassword return true; } - $char = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY); + $char = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY); $last = ""; $count = 0; diff --git a/htdocs/core/tpl/resource_add.tpl.php b/htdocs/core/tpl/resource_add.tpl.php index 7494c0a0113..bff55cca329 100644 --- a/htdocs/core/tpl/resource_add.tpl.php +++ b/htdocs/core/tpl/resource_add.tpl.php @@ -17,7 +17,7 @@ $out = ''; $out .= '
'; -$out .= '
'; +$out .= ''; $out .= ''; $out .= ''; $out .= ''; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 2e6e53aab5f..34c90ca7173 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -777,7 +777,7 @@ if (($action == "create") || ($action == "edit")) { print ''; print $langs->trans('CronLastOutput').""; - print ''.nl2br($object->lastoutput).''; + print ''.(!empty($object->lastoutput) ? nl2br($object->lastoutput) : '').''; print ""; print '';