Fix infinite loop while installing
This commit is contained in:
@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user