Fixed php warnings

This commit is contained in:
Benjamin Renard 2012-09-03 10:22:18 +02:00
parent 702d53839d
commit d9d312957f
4 changed files with 11 additions and 5 deletions

View file

@ -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 {

View file

@ -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;
}
/**

View file

@ -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) {

View file

@ -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');
}