mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #11053 from creative-commoners/pulls/4.13/fix-deprecation-enabled-check
FIX Make deprecation enabled check faster
This commit is contained in:
commit
bbc6167fe3
@ -234,13 +234,13 @@ class Deprecation
|
|||||||
|
|
||||||
public static function isEnabled(): bool
|
public static function isEnabled(): bool
|
||||||
{
|
{
|
||||||
if (!Director::isDev()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (Environment::hasEnv('SS_DEPRECATION_ENABLED')) {
|
if (Environment::hasEnv('SS_DEPRECATION_ENABLED')) {
|
||||||
$envVar = Environment::getEnv('SS_DEPRECATION_ENABLED');
|
$envVar = Environment::getEnv('SS_DEPRECATION_ENABLED');
|
||||||
return self::varAsBoolean($envVar);
|
return self::varAsBoolean($envVar);
|
||||||
}
|
}
|
||||||
|
if (!Director::isDev()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return static::$currentlyEnabled;
|
return static::$currentlyEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user