diff --git a/src/Socialbox/Classes/CliCommands/InitializeCommand.php b/src/Socialbox/Classes/CliCommands/InitializeCommand.php index 0e9e694..cb03c43 100644 --- a/src/Socialbox/Classes/CliCommands/InitializeCommand.php +++ b/src/Socialbox/Classes/CliCommands/InitializeCommand.php @@ -348,7 +348,7 @@ case 'SB_CRYPTO_KEYPAIR_EXPIRES': case 'SB_CRYPTO_ENCRYPTION_KEYS_COUNT': case 'SB_CACHE_PORT': - if($variable !== false) + if($variable !== false && is_numeric($variable)) { Configuration::getConfigurationLib()->set($config, (int) $variable); Program::getLogger()->info(sprintf('Set %s to %s', $config, $variable)); diff --git a/src/Socialbox/Objects/Standard/ServerInformation.php b/src/Socialbox/Objects/Standard/ServerInformation.php index 101d33a..09814b7 100644 --- a/src/Socialbox/Objects/Standard/ServerInformation.php +++ b/src/Socialbox/Objects/Standard/ServerInformation.php @@ -19,7 +19,7 @@ public function __construct(array $data) { $this->serverName = $data['server_name']; - $this->serverKeypairExpires = $data['server_keypair_expires']; + $this->serverKeypairExpires = (int)$data['server_keypair_expires'] ?? 0; $this->transportEncryptionAlgorithm = $data['transport_encryption_algorithm']; }