【问题标题】:$config must be a string or an array$config 必须是字符串或数组
【发布时间】:2021-11-13 09:46:53
【问题描述】:

我在尝试访问我的应用上的订阅部分时遇到错误。这是条带 API 的问题,此错误主要发生在清除服务器缓存时。我检查以清除缓存、检查config.app.php、支付控制器以及所有这些,但并没有真正了解此错误的来源!

因此我需要某人的帮助,也许在此之前遇到此问题的人是 vendor/stripe/stripe-php/lib/BaseStripeClient.php 上的代码行。请为此错误提出解决方案!我将不胜感激

if (\is_string($config)) {

        $config = ['api_key' => $config];

    } elseif (!\is_array($config)) {

        throw new \Stripe\Exception\InvalidArgumentException('$config must be a string or an array');

    }

【问题讨论】:

    标签: arrays laravel string api


    【解决方案1】:

    php artisan config:cache运行这个命令

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center。
    猜你喜欢
    • 1970-01-01
    • 2019-10-15
    • 2022-07-14
    • 2020-05-05
    • 2017-05-06
    • 2019-11-04
    • 1970-01-01
    • 2020-09-11
    • 1970-01-01
    相关资源
    最近更新 更多