diff --git a/Plugin/InitPlugin.php b/Plugin/InitPlugin.php index 1eba2d2..819c137 100755 --- a/Plugin/InitPlugin.php +++ b/Plugin/InitPlugin.php @@ -4,12 +4,14 @@ class InitPlugin { - public function beforeLaunch(\Magento\Framework\AppInterface $subject) - { - $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); - $deploymentConfig = $objectManager->get(\Magento\Framework\App\DeploymentConfig::class); - $rollbarConfig = $deploymentConfig->get('rollbar'); + public function beforeLaunch(\Magento\Framework\AppInterface $subject) + { + $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); + $deploymentConfig = $objectManager->get(\Magento\Framework\App\DeploymentConfig::class); + $rollbarConfig = $deploymentConfig->get('rollbar'); - \Rollbar\Rollbar::init($rollbarConfig); - } -} \ No newline at end of file + if($rollbarConfig) { + \Rollbar\Rollbar::init($rollbarConfig); + } + } +}