mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12:30:10 +00:00
Simplified null check
This commit is contained in:
parent
4a6d33e182
commit
8a5560ec8f
7 changed files with 14 additions and 14 deletions
|
@ -37,10 +37,10 @@ class Apps extends BaseApi
|
|||
*/
|
||||
public static function post(array $parameters = [])
|
||||
{
|
||||
$name = !isset($_REQUEST['client_name']) ? '' : $_REQUEST['client_name'];
|
||||
$redirect = !isset($_REQUEST['redirect_uris']) ? '' : $_REQUEST['redirect_uris'];
|
||||
$scopes = !isset($_REQUEST['scopes']) ? '' : $_REQUEST['scopes'];
|
||||
$website = !isset($_REQUEST['website']) ? '' : $_REQUEST['website'];
|
||||
$name = $_REQUEST['client_name'] ?? '';
|
||||
$redirect = $_REQUEST['redirect_uris'] ?? '';
|
||||
$scopes = $_REQUEST['scopes'] ?? '';
|
||||
$website = $_REQUEST['website'] ?? '';
|
||||
|
||||
if (empty($name) || empty($redirect)) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Missing parameters'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue