diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 059dfe4a..ccceca6b 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -235,7 +235,7 @@ class baseModule { // empty input if (($options[$identifiers[$i]][0] == '') || !isset($options[$identifiers[$i]][0])) { // check if option is required - if ($this->meta['profile_checks'][$identifiers[$i]]['required']) { + if (isset($this->meta['profile_checks'][$identifiers[$i]]['required']) && $this->meta['profile_checks'][$identifiers[$i]]['required']) { $messages[] = $this->meta['profile_checks'][$identifiers[$i]]['required_message']; } continue; diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index e107cec5..2ad61b99 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -580,7 +580,7 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex if (isset($values[$input[$i][$j]['name']])) { $output .= ' value="' . $values[$input[$i][$j]['name']][0] . '"'; } - elseif ($input[$i][$j]['value']!='') $output .= ' value="' . $input[$i][$j]['value'] . '"'; + elseif (isset($input[$i][$j]['value']) && $input[$i][$j]['value']!='') $output .= ' value="' . $input[$i][$j]['value'] . '"'; } if (isset($input[$i][$j]['disabled']) && ($input[$i][$j]['disabled'] == true)) $output .= ' disabled'; // Show taborder diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index f82d8d9a..9f334640 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -57,7 +57,7 @@ if (isset($_POST['accounttype'])) $_GET['type'] = $_POST['accounttype']; // abort button was pressed // back to profile editor -if ($_POST['abort']) { +if (isset($_POST['abort'])) { metaRefresh("profilemain.php"); exit; } @@ -69,7 +69,7 @@ echo "\n
\n"; // save button was presed -if ($_POST['save']) { +if (isset($_POST['save'])) { // create option array to check and save $options = array(); $opt_keys = array_keys($_SESSION['profile_types']); @@ -80,7 +80,7 @@ if ($_POST['save']) { } // checkboxes elseif ($_SESSION['profile_types'][$element] == "checkbox") { - if ($_POST[$element] == "on") $options[$element] = array('true'); + if (isset($_POST[$element]) && ($_POST[$element] == "on")) $options[$element] = array('true'); else $options[$element] = array('false'); } // dropdownbox @@ -89,14 +89,15 @@ if ($_POST['save']) { } // multiselect elseif ($_SESSION['profile_types'][$element] == "multiselect") { - $options[$element] = $_POST[$element]; // value is already an array + if (isset($_POST[$element])) $options[$element] = $_POST[$element]; // value is already an array + else $options[$element] = array(); } } // remove double slashes if magic quotes are on if (get_magic_quotes_gpc() == 1) { foreach ($opt_keys as $element) { - if (is_string($options[$element][0])) $options[$element][0] = stripslashes($options[$element][0]); + if (isset($options[$element][0]) && is_string($options[$element][0])) $options[$element][0] = stripslashes($options[$element][0]); } } @@ -179,7 +180,7 @@ echo "
\n" . _("LDAP") . ""; echo ""; for ($i = 0; $i < sizeof($rdns); $i++) { - if ($old_options['ldap_rdn'][0] == $rdns[$i]) { + if (isset($old_options['ldap_rdn']) && ($old_options['ldap_rdn'][0] == $rdns[$i])) { echo "\n"; } else {