Always prefer stricter string comparisons.
This commit is contained in:
@@ -156,7 +156,7 @@ class EnvironmentVariable extends Model
|
||||
|
||||
private function get_real_environment_variables(?string $environment_variable = null, $resource = null)
|
||||
{
|
||||
if ((is_null($environment_variable) && $environment_variable == '') || is_null($resource)) {
|
||||
if ((is_null($environment_variable) && $environment_variable === '') || is_null($resource)) {
|
||||
return null;
|
||||
}
|
||||
$environment_variable = trim($environment_variable);
|
||||
@@ -202,7 +202,7 @@ class EnvironmentVariable extends Model
|
||||
|
||||
private function set_environment_variables(?string $environment_variable = null): ?string
|
||||
{
|
||||
if (is_null($environment_variable) && $environment_variable == '') {
|
||||
if (is_null($environment_variable) && $environment_variable === '') {
|
||||
return null;
|
||||
}
|
||||
$environment_variable = trim($environment_variable);
|
||||
|
||||
Reference in New Issue
Block a user