Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP ошибка Argument 1 passed to VKApiError::__construct() must be of the type array, string given #74

Open
wlf10 opened this issue Sep 27, 2019 · 2 comments

Comments

@wlf10
Copy link

wlf10 commented Sep 27, 2019

В функции parseResponse после обработки в decode_body содержится следующий массив, где error передается не как массив, а как строка

Array
(
[error] => ERR_UPLOAD_BAD_IMAGE_SIZE: market photo min size 400x400
[bwact] => do_add
[server] => 854320
[_sig] => 0192528750fa266e7558211ed60ccaee
)

из-за этого php падает с ошибкой

Uncaught TypeError: Argument 1 passed to VK\Client\VKApiError::__construct() must be of the type array, string given, called in
... VK/Client/VKApiRequest.php on line 131 and defined in ... VK/Client/VKApiError.php:27
Stack trace:
#0 ... VK/Client/VKApiRequest.php(131): VK\Client\VKApiError->_construct('ERR_UPLOAD_BAD...')
#1 ... VK/Client/VKApiRequest.php(110): VK\Client\VKApiRequest->parseResponse(Object(VK\TransportClient\TransportClientResponse))
#2 xyz.php(2): VK\Client\VKApiRequest->upload('https://pu1-28....', 'file', '/home/c/92524...')

@mihan007
Copy link

Same error

@DaemonLeo
Copy link

У меня совершенно та же ошибка. Она возникает на файлы больше 5МБ. Видео 11МБ я не могу загрузить и фото тоже. Поддержка ВК ничего дельного не ответила.

Удалось побороть проблему?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants