Skip to content

Commit

Permalink
Merge pull request #11053 from creative-commoners/pulls/4.13/fix-depr…
Browse files Browse the repository at this point in the history
…ecation-enabled-check

FIX Make deprecation enabled check faster
  • Loading branch information
GuySartorelli authored Nov 17, 2023
2 parents 4c76ec6 + 05f1d9a commit bbc6167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dev/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ public static function get_enabled()

public static function isEnabled(): bool
{
if (!Director::isDev()) {
return false;
}
if (Environment::hasEnv('SS_DEPRECATION_ENABLED')) {
$envVar = Environment::getEnv('SS_DEPRECATION_ENABLED');
return self::varAsBoolean($envVar);
}
if (!Director::isDev()) {
return false;
}
return static::$currentlyEnabled;
}

Expand Down

0 comments on commit bbc6167

Please sign in to comment.