fix php warnings and errors (#28207)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
This commit is contained in:
parent
3a45d510ac
commit
88232ff0fc
7 changed files with 15 additions and 10 deletions
|
|
@ -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')) {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ $out = '';
|
|||
|
||||
$out .= '<div class="centpercent allwidth nohover">';
|
||||
|
||||
$out .= '<form class="nohover '.($var == true ? 'pair' : 'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$out .= '<form class="nohover '.(!empty($var) && $var == true ? 'pair' : 'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$out .= '<input type="hidden" name="action" value="add_element_resource">';
|
||||
$out .= '<input type="hidden" name="element" value="'.$element.'">';
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ if (($action == "create") || ($action == "edit")) {
|
|||
|
||||
print '<tr><td>';
|
||||
print $langs->trans('CronLastOutput')."</td><td>";
|
||||
print '<span class="small">'.nl2br($object->lastoutput).'</span>';
|
||||
print '<span class="small">'.(!empty($object->lastoutput) ? nl2br($object->lastoutput) : '').'</span>';
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue