Improved expiration check

This commit is contained in:
netkas 2025-01-29 15:26:10 -05:00
parent 38699b6bcc
commit f76f76d31a

View file

@ -13,7 +13,7 @@
use Socialbox\Objects\ClientRequest; use Socialbox\Objects\ClientRequest;
use Socialbox\Objects\RpcRequest; use Socialbox\Objects\RpcRequest;
class SettingsAddSigningKey extends Method class SettingsAddSignature extends Method
{ {
/** /**
* @inheritDoc * @inheritDoc
@ -26,13 +26,13 @@
} }
$expires = null; $expires = null;
if($rpcRequest->containsParameter('expires')) if($rpcRequest->containsParameter('expires') && $rpcRequest->getParameter('expires') !== null)
{ {
$expires = (int)$rpcRequest->getParameter('expires'); $expires = (int)$rpcRequest->getParameter('expires');
} }
$name = null; $name = null;
if($rpcRequest->containsParameter('name')) if($rpcRequest->containsParameter('name') && $rpcRequest->getParameter('name') !== null)
{ {
$name = $rpcRequest->getParameter('name'); $name = $rpcRequest->getParameter('name');
} }