Fix infinite loop while installing

This commit is contained in:
David Stone
2024-12-20 10:45:34 -07:00
parent 86d72fb596
commit ac0b0f714d

View File

@ -48,6 +48,11 @@ class Settings {
*/ */
private $sections = null; private $sections = null;
/**
* @var bool
*/
private bool $saving = false;
/** /**
* Runs on singleton instantiation. * Runs on singleton instantiation.
* *
@ -160,8 +165,12 @@ class Settings {
} // end if; } // end if;
if ($this->settings === false || empty($this->settings)) { if ($this->settings === false || empty($this->settings)) {
if (! $this->saving) {
$this->settings = $this->save_settings(array(), true); $this->saving = true;
$this->settings = $this->save_settings( array(), true );
} else {
return array();
}
} // end if; } // end if;