From 82fcb18c4ade03ab82ae2c32616cc69ec2bf085f Mon Sep 17 00:00:00 2001 From: Ry0 <43928323+xRy0@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:41:16 +0300 Subject: [PATCH] Finaly, Tarhun --- Web/Presenters/VKAPIPresenter.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Web/Presenters/VKAPIPresenter.php b/Web/Presenters/VKAPIPresenter.php index 62f95723..d82194cf 100644 --- a/Web/Presenters/VKAPIPresenter.php +++ b/Web/Presenters/VKAPIPresenter.php @@ -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