[CORE][GNUSocial] Prevent multiple initializations
This commit is contained in:
parent
360a95c7aa
commit
9cf83db62a
|
@ -153,6 +153,7 @@ class GNUsocial implements EventSubscriberInterface
|
||||||
*/
|
*/
|
||||||
public function initialize(): void
|
public function initialize(): void
|
||||||
{
|
{
|
||||||
|
if (!$this->initialized) {
|
||||||
Common::setupConfig($this->config);
|
Common::setupConfig($this->config);
|
||||||
if (!\is_null($this->request)) {
|
if (!\is_null($this->request)) {
|
||||||
Common::setRequest($this->request);
|
Common::setRequest($this->request);
|
||||||
|
@ -174,6 +175,9 @@ class GNUsocial implements EventSubscriberInterface
|
||||||
|
|
||||||
// Events are preloaded on compilation, but set at runtime, along with configuration
|
// Events are preloaded on compilation, but set at runtime, along with configuration
|
||||||
$this->module_manager->loadModules();
|
$this->module_manager->loadModules();
|
||||||
|
|
||||||
|
$this->initialized = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user