strlen() and count() are always 0 = false or more = true

This commit is contained in:
djmaze 2021-11-18 10:15:33 +01:00
parent 779e7c7685
commit 30bec04a75
50 changed files with 322 additions and 324 deletions

View file

@ -19,11 +19,11 @@ class Application extends \RainLoop\Config\AbstractConfig
$bResult = parent::Load();
$this->aReplaceEnv = null;
if ((isset($_ENV) && \is_array($_ENV) && 0 < \count($_ENV)) ||
(isset($_SERVER) && \is_array($_SERVER) && 0 < \count($_SERVER)))
if ((isset($_ENV) && \is_array($_ENV) && \count($_ENV)) ||
(isset($_SERVER) && \is_array($_SERVER) && \count($_SERVER)))
{
$sEnvNames = $this->Get('labs', 'replace_env_in_configuration', '');
if (0 < \strlen($sEnvNames))
if (\strlen($sEnvNames))
{
$this->aReplaceEnv = \explode(',', $sEnvNames);
if (\is_array($this->aReplaceEnv))
@ -93,7 +93,7 @@ class Application extends \RainLoop\Config\AbstractConfig
$this->SetPassword($sPassword);
return true;
}
return 0 < \strlen($sPassword) && \password_verify($sPassword, $sConfigPassword);
return \strlen($sPassword) && \password_verify($sPassword, $sConfigPassword);
}
public function Save() : bool