[CORE][GNUSocial] Prevent multiple initializations

This commit is contained in:
Hugo Sales 2022-11-20 21:54:36 +00:00
parent 360a95c7aa
commit 9cf83db62a
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -153,6 +153,7 @@ class GNUsocial implements EventSubscriberInterface
*/
public function initialize(): void
{
if (!$this->initialized) {
Common::setupConfig($this->config);
if (!\is_null($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
$this->module_manager->loadModules();
$this->initialized = true;
}
}
/**