Skip to content

Commit

Permalink
Merge pull request #11 from sansecio/check-empty-key
Browse files Browse the repository at this point in the history
don't enable module when license key is empty
  • Loading branch information
danslo authored Feb 20, 2025
2 parents 9fa2a89 + c8bde6d commit 22f41e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public function __construct(ScopeConfigInterface $config)

public function isEnabled(): bool
{
return (bool) $this->config->getValue(self::XML_PATH_ENABLED);
$enabled = (bool) $this->config->getValue(self::XML_PATH_ENABLED);
return $enabled && $this->getLicenseKey() !== '';
}

public function isReportEnabled(): bool
Expand Down

0 comments on commit 22f41e6

Please sign in to comment.