Hanson / vbot

微信,企微,机器人,企业微信,企微机器人,微信机器人,小红书,美团,美团爬虫,聚合聊天,RPA,协议,hook,逆向,群发,自动回复,chatgpt,API对接,稳定防封全语言通用,企业定制/SCRM/SAAS专用
MIT License
4.06k stars 711 forks source link

扫码后报错 array_merge(): Argument #2 is not an array #211

Open xyouAI opened 7 years ago

xyouAI commented 7 years ago

[2017-08-25 10:40:14][INFO] init success. [2017-08-25 10:40:14][自定义消息] 登录成功 [2017-08-25 10:40:14][INFO] init contacts begin. [2017-08-25 10:40:18][自定义消息] 获取好友成功 [2017-08-25 10:40:18][自定义消息] 准备接收消息 PHP Fatal error: Uncaught ErrorException: array_merge(): Argument #2 is not an array in /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php:101 Stack trace:

0 [internal function]: Hanson\Vbot\Foundation\ExceptionHandler->handleError(2, 'array_merge(): ...', '/Library/WebSer...', 101, Array)

1 /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php(101): array_merge(Array, NULL)

2 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Extension/AbstractMessageHandler.php(41): Vbot\HotGirl\HotGirl->register()

3 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Extension/MessageExtension.php(64): Hanson\Vbot\Extension\AbstractMessageHandler->init()

4 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Core/MessageHandler.php(31): Hanson\Vbot\Extension\MessageExtension->initServiceExtensions()

5 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Core/Server.php(43): Hanson\Vbot\Core\MessageHandler->listen()

6 /Library/WebServer/Documents/my-vbot/Exampl in /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php on line 101

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalErrorException: Uncaught ErrorException: array_merge(): Argument #2 is not an array in /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php:101 Stack trace:

0 [internal function]: Hanson\Vbot\Foundation\ExceptionHandler->handleError(2, 'array_merge(): ...', '/Library/WebSer...', 101, Array)

1 /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php(101): array_merge(Array, NULL)

2 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Extension/AbstractMessageHandler.php(41): Vbot\HotGirl\HotGirl->register()

3 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Extension/MessageExtension.php(64): Hanson\Vbot\Extension\AbstractMessageHandler->init()

4 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Core/MessageHandler.php(31): Hanson\Vbot\Extension\MessageExtension->initServiceExtensions()

5 /Library/WebServer/Documents/my-vbot/vendor/hanson/vbot/src/Core/Server.php(43): Hanson\Vbot\Core\Message in /Library/WebServer/Documents/my-vbot/vendor/vbot/hot-girl/src/HotGirl.php on line 101

cikiChe commented 7 years ago

这个问题是因为config.php文件不完整造成的。

cikiChe commented 7 years ago

具体的内容是什么我不知道,我的做法是在配置文件里面加了 一个 hot-girl=>[],的空数组

xyouAI commented 7 years ago

还真是,配上 hot-girl=>[], 就好了。谢谢这位朋友!

qiufeng5LIFE commented 7 years ago

我在config.php文件中加了'hot-girl' => [],但是还是报这个错?是需要给个默认值吗?

yiisangel commented 7 years ago

我也加了'hot-girl' => [], 一样报错

tao2581 commented 6 years ago

正确的配置名称:

'extension.hot_girl' => []

image

huanglike commented 6 years ago

一楼是在linux下部署的吗?我的Windows下 cmd里扫码后输出的全是中文乱码头疼。

huanglike commented 6 years ago

肯定的呀,array_merge的参数必须都是数组,否则肯定给你警告啊。