diff --git a/Helper/Config.php b/Helper/Config.php index b59d8fd..2e18adb 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -63,11 +63,13 @@ public function __construct( */ public function getConfiguration() { - if(isset($this->bugsnagConfig) && is_array($this->bugsnagConfig)) { + if ($this->config instanceof Configuration) { + return $this->config; + } else if(isset($this->bugsnagConfig) && is_array($this->bugsnagConfig)) { $apiKey = $this->getApiKey(); - $releaseStage = $this->getReleaseStage(); if ($apiKey) { $this->config = new Configuration($apiKey); + $releaseStage = $this->getReleaseStage(); if ($releaseStage) { $this->config->setReleaseStage($releaseStage); }