mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
fix audio.add (#1121)
* fix audio.add * Fix settype to allow Null * thx celestora <3 * Finaly, Tarhun
This commit is contained in:
parent
8786bd36fb
commit
9d62bfc12e
2 changed files with 9 additions and 3 deletions
|
@ -234,8 +234,14 @@ final class VKAPIPresenter extends OpenVKPresenter
|
|||
}
|
||||
|
||||
try {
|
||||
// Проверка типа параметра
|
||||
$type = $parameter->getType();
|
||||
if (($type && !$type->isBuiltin()) || is_null($val)) {
|
||||
$params[] = $val;
|
||||
} else {
|
||||
settype($val, $parameter->getType()->getName());
|
||||
$params[] = $val;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// Just ignore the exception, since
|
||||
// some args are intended for internal use
|
||||
|
|
Loading…
Reference in a new issue