Refactor SettingsAddSignature to ensure 'name' parameter is cast to string for proper handling and remove unnecessary exception handling for missing parameter.
https://github.com/nosial/Socialbox-PHP/issues/56
This commit is contained in:
parent
7aafd0334e
commit
9806c317e9
1 changed files with 1 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Socialbox\Classes\StandardMethods\Settings;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use Socialbox\Abstracts\Method;
|
||||
use Socialbox\Classes\Configuration;
|
||||
|
@ -33,15 +32,11 @@
|
|||
{
|
||||
$expires = (int)$rpcRequest->getParameter('expires');
|
||||
}
|
||||
if(!$rpcRequest->containsParameter('name'))
|
||||
{
|
||||
throw new MissingRpcArgumentException('name');
|
||||
}
|
||||
|
||||
$name = null;
|
||||
if($rpcRequest->containsParameter('name'))
|
||||
{
|
||||
$name = $rpcRequest->getParameter('name');
|
||||
$name = (string)$rpcRequest->getParameter('name');
|
||||
}
|
||||
|
||||
try
|
||||
|
|
Loading…
Add table
Reference in a new issue