Skip to content

Commit 2072675

Browse files
committed
use isset
1 parent dd60cf2 commit 2072675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

solid/lib/Controller/ServerController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ public function session() {
322322
public function token() {
323323
$request = \Laminas\Diactoros\ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES);
324324
$requestBody = $request->getParsedBody();
325-
$grantType = $requestBody['grant_type'] ? $requestBody['grant_type'] : null;
326-
$clientId = $requestBody['client_id'] ? $requestBody['client_id'] : null;
325+
$grantType = isset($requestBody['grant_type']) ? $requestBody['grant_type'] : null;
326+
$clientId = isset($requestBody['client_id']) ? $requestBody['client_id'] : null;
327327
switch ($grantType) {
328328
case "authorization_code":
329329
$code = $requestBody['code'];

0 commit comments

Comments
 (0)