Skip to content

Commit

Permalink
User: Fix getItemByPostVar Might Return false
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Dec 14, 2023
1 parent 21550b5 commit 6b23211
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Services/User/Profile/classes/class.ilPersonalProfileGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,9 @@ public function savePersonalData()
private function emailChanged() : bool
{
$email_input = $this->form->getItemByPostVar('usr_email');
if ($email_input !== null && !$email_input->getDisabled()
if ($email_input !== null
&& $email_input !== false
&& !$email_input->getDisabled()
&& $this->form->getInput('usr_email') !== $this->user->getEmail()) {
return true;
}
Expand Down

0 comments on commit 6b23211

Please sign in to comment.