Skip to content

Commit cd3d0d9

Browse files
committed
use isset
1 parent 9bb9a25 commit cd3d0d9

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
@@ -325,8 +325,8 @@ public function session() {
325325
public function token() {
326326
$request = \Laminas\Diactoros\ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES);
327327
$requestBody = $request->getParsedBody();
328-
$grantType = $requestBody['grant_type'] ? $requestBody['grant_type'] : null;
329-
$clientId = $requestBody['client_id'] ? $requestBody['client_id'] : null;
328+
$grantType = isset($requestBody['grant_type']) ? $requestBody['grant_type'] : null;
329+
$clientId = isset($requestBody['client_id']) ? $requestBody['client_id'] : null;
330330
switch ($grantType) {
331331
case "authorization_code":
332332
$code = $requestBody['code'];

0 commit comments

Comments
 (0)