Skip to content

运行artisan tinker报ServiceProvider报错 #199

Closed
@hzwwen

Description

@hzwwen

【运行环境】
php:7.1
laravel:5.5
laravel-wechat:4.0.1

【错误日志】
array_merge(): Argument #2 is not an array {"exception":"[object] (ErrorException(code: 0): array_merge(): Argument #2 is not an array at /vendor/overtrue/laravel-wechat/src/ServiceProvider.php:94)

【错误代码】
$app = new $class(array_merge(config('wechat.defaults', []), config("wechat.{$name}.{$account}")));

【发现】
config("wechat.{$name}.{$account}") = config("wechat.mini_program.default") = null
但config/wechat.php是完全按照模板配置的

【临时解决】
修改config("wechat.{$name}.{$account}") 为 config("wechat.{$name}.{$account}", [])

只有在运行artisan tinker的时候才会报该错误,其余一切正常

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions