mirror of
https://github.com/friendica/friendica
synced 2025-04-24 04:30:11 +00:00
Simplified null check
This commit is contained in:
parent
4a6d33e182
commit
8a5560ec8f
7 changed files with 14 additions and 14 deletions
|
@ -34,9 +34,9 @@ class Token extends BaseApi
|
|||
{
|
||||
public static function post(array $parameters = [])
|
||||
{
|
||||
$client_secret = !isset($_REQUEST['client_secret']) ? '' : $_REQUEST['client_secret'];
|
||||
$code = !isset($_REQUEST['code']) ? '' : $_REQUEST['code'];
|
||||
$grant_type = !isset($_REQUEST['grant_type']) ? '' : $_REQUEST['grant_type'];
|
||||
$client_secret = $_REQUEST['client_secret'] ?? '';
|
||||
$code = $_REQUEST['code'] ?? '';
|
||||
$grant_type = $_REQUEST['grant_type'] ?? '';
|
||||
|
||||
if ($grant_type != 'authorization_code') {
|
||||
Logger::warning('Unsupported or missing grant type', ['request' => $_REQUEST]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue