Finaly, Tarhun

This commit is contained in:
Ry0 2024-07-01 22:41:16 +03:00
parent 5fae56f6bf
commit 82fcb18c4a

View file

@ -236,10 +236,12 @@ final class VKAPIPresenter extends OpenVKPresenter
try {
// Проверка типа параметра
$type = $parameter->getType();
if (($type && !$type->isBuiltin()) || is_null($val))
if (($type && !$type->isBuiltin()) || is_null($val)) {
$params[] = $val;
else
$params[] = settype($val, $type->getName());
} else {
settype($val, $parameter->getType()->getName());
$params[] = $val;
}
} catch (\Throwable $e) {
// Just ignore the exception, since
// some args are intended for internal use