Skip to content

Commit

Permalink
VKAPI: PHP 8.2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
veselcraft committed Nov 1, 2023
1 parent fd11dfc commit a2473c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Web/Presenters/VKAPIPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,13 @@ function renderRoute(string $object, string $method): void
$this->badMethodCall($object, $method, $parameter->getName());
}

settype($val, $parameter->getType()->getName());
$params[] = $val;
try {
settype($val, $parameter->getType()->getName());
$params[] = $val;
} catch (\Throwable $e) {
// Just ignore the exception, since
// some args are intended for internal use
}
}

define("VKAPI_DECL_VER", $this->requestParam("v") ?? "4.100", false);
Expand Down

0 comments on commit a2473c6

Please sign in to comment.