VKAPI: PHP 8.2 fixes

This commit is contained in:
veselcraft 2023-11-01 14:52:24 +03:00
parent fd11dfcdd9
commit a2473c68fe
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA

View file

@ -233,8 +233,13 @@ final class VKAPIPresenter extends OpenVKPresenter
$this->badMethodCall($object, $method, $parameter->getName()); $this->badMethodCall($object, $method, $parameter->getName());
} }
try {
settype($val, $parameter->getType()->getName()); settype($val, $parameter->getType()->getName());
$params[] = $val; $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); define("VKAPI_DECL_VER", $this->requestParam("v") ?? "4.100", false);