diff --git a/public_html/create.php b/public_html/create.php index ddc1a44a..49f85733 100644 --- a/public_html/create.php +++ b/public_html/create.php @@ -37,7 +37,7 @@ if(LSsession :: startLSsession()) { if ( LSsession :: canCreate($LSobject) ) { $object = new $LSobject(); - if ($_GET['load']!='') { + if (isset($_GET['load']) && $_GET['load']!='') { $form = $object -> getForm('create',urldecode($_GET['load'])); } else { diff --git a/public_html/includes/class/class.LSattribute.php b/public_html/includes/class/class.LSattribute.php index 51ee11ef..8ee43ce3 100644 --- a/public_html/includes/class/class.LSattribute.php +++ b/public_html/includes/class/class.LSattribute.php @@ -232,13 +232,16 @@ class LSattribute { else if (isset($this -> config['default_value'])) { $data=$obj -> getFData($this -> config['default_value']); } + else { + $data=NULL; + } $element = $this -> html -> addToForm($form,$idForm,$data); if(!$element) { LSerror :: addErrorCode('LSform_06',$this -> name); } - if($this -> config['required']==1) { + if(isset($this -> config['required']) && $this -> config['required']==1) { $form -> setRequired($this -> name); } @@ -568,7 +571,10 @@ class LSattribute { * @retval mixed La configuration de validation de l'attribut */ function getValidateConfig() { - return $this -> config['validation']; + if (isset($this -> config['validation'])) { + return $this -> config['validation']; + } + return; } /** diff --git a/public_html/includes/class/class.LSform.php b/public_html/includes/class/class.LSform.php index b33e87e5..8462a648 100644 --- a/public_html/includes/class/class.LSform.php +++ b/public_html/includes/class/class.LSform.php @@ -352,7 +352,7 @@ class LSform { if (empty($value)) { continue; } - if (!is_array($this -> _rules[$element])) + if (!isset($this -> _rules[$element]) || !is_array($this -> _rules[$element])) continue; LSsession :: loadLSclass('LSformRule'); foreach($this -> _rules[$element] as $rule) { diff --git a/public_html/includes/class/class.LSformElement_password.php b/public_html/includes/class/class.LSformElement_password.php index 30d6eb53..c51966ca 100644 --- a/public_html/includes/class/class.LSformElement_password.php +++ b/public_html/includes/class/class.LSformElement_password.php @@ -80,7 +80,7 @@ class LSformElement_password extends LSformElement { LSdebug ('send by form'); } } - else if ($this -> params['html_options']['mail']['send']==1) { + else if (isset($this -> params['html_options']['mail']['isset'])) && $this -> params['html_options']['mail']['send']==1) { $this -> sendMail = true; LSdebug ('send by config'); }