Skip to content

Commit 2c8fd1c

Browse files
committed
Apply Jordi's suggestion of FILTER_VALIDATE_BOOL in isDevelopmentMode
1 parent 9ed748f commit 2c8fd1c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ProjectGlobals.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace phpweb;
44

55
use Error;
6+
use function filter_var;
67
use function realpath;
78

89
class ProjectGlobals
@@ -26,6 +27,6 @@ public static function getPublicRoot(): string
2627

2728
public static function isDevelopmentMode(): bool
2829
{
29-
return ($_ENV['DEVELOPMENT'] ?? '') === '1';
30+
return filter_var(($_ENV['DEVELOPMENT'] ?? ''), FILTER_VALIDATE_BOOL);
3031
}
3132
}

0 commit comments

Comments
 (0)