mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 06:23:48 +01:00
Fix some PHP notices
This commit is contained in:
parent
68c6e4267b
commit
8bb4a1c9cf
5 changed files with 7 additions and 5 deletions
|
@ -65,9 +65,10 @@ LSerror :: defineError('MAIL_01',
|
|||
* @retval boolean true si MAIL est pleinement supporté, false sinon
|
||||
*/
|
||||
function sendMail($to,$subject,$msg,$headers=array()) {
|
||||
$mail_obj = & Mail::factory(MAIL_SEND_METHOD, $MAIL_SEND_PARAMS);
|
||||
global $MAIL_SEND_PARAMS, $MAIL_HEARDERS;
|
||||
$mail_obj = Mail::factory(MAIL_SEND_METHOD, (isset($MAIL_SEND_PARAMS)?$MAIL_SEND_PARAMS:null));
|
||||
|
||||
if(is_array($MAIL_HEARDERS)) {
|
||||
if (isset($MAIL_HEARDERS) && is_array($MAIL_HEARDERS)) {
|
||||
$headers = array_merge($headers,$MAIL_HEARDERS);
|
||||
}
|
||||
if ($subject) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class LSformElement_image extends LSformElement {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (is_uploaded_file($_FILES[$this -> name]['tmp_name'])) {
|
||||
if (isset($_FILES[$this -> name]) && isset($_FILES[$this -> name]['tmp_name']) && is_uploaded_file($_FILES[$this -> name]['tmp_name'])) {
|
||||
$fp = fopen($_FILES[$this -> name]['tmp_name'], "r");
|
||||
$buf = fread($fp, filesize($_FILES[$this -> name]['tmp_name']));
|
||||
fclose($fp);
|
||||
|
|
|
@ -87,6 +87,7 @@ class LSformElement_password extends LSformElement {
|
|||
if ($this -> sendMail && LSsession :: loadLSaddon('mail')) {
|
||||
$msg = $this -> getParam('html_options.mail.msg');
|
||||
$subject = $this -> getParam('html_options.mail.subject');
|
||||
$mail = "";
|
||||
if (isset($_POST['LSformElement_password_'.$this -> name.'_msg'])) {
|
||||
$msgInfos = json_decode($_POST['LSformElement_password_'.$this -> name.'_msg']);
|
||||
if ($msgInfos -> subject) {
|
||||
|
|
|
@ -368,7 +368,7 @@ class LSrelation {
|
|||
$data['id'] = $_REQUEST['id'];
|
||||
}
|
||||
else {
|
||||
LSerror :: addErrorCode('LSrelations_03',$relationName);
|
||||
LSerror :: addErrorCode('LSrelations_03', $conf['relationName']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -440,7 +440,7 @@ function LSdebugDefined() {
|
|||
if (!is_array($chs)) {
|
||||
$chs=array('chars' => $chs);
|
||||
}
|
||||
if (!is_int($chs['nb'])) {
|
||||
if (!isset($chs['nb']) || !is_int($chs['nb'])) {
|
||||
$chs['nb']=1;
|
||||
}
|
||||
$retval.=aleaChar($chs['chars'],$chs['nb']);
|
||||
|
|
Loading…
Reference in a new issue