【问题标题】:Catchable fatal error: Argument 1 passed to Illuminate\Config\Repository::__construct() must be of the type array, integer given可捕获的致命错误:传递给 Illuminate\Config\Repository::__construct() 的参数 1 必须是数组类型,给定整数
【发布时间】:2017-05-08 02:12:36
【问题描述】:

我在发出此命令时遇到问题php artisan cache:clearphp artisan 我收到此错误。

可捕获的致命错误:参数 1 传递给 Illuminate\Config\Repository::__construct() 必须是数组类型, 整数给定整数给定,调用 /var/www/mysite/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php 在第 32 行并定义在 /var/www/mysite/vendor/laravel/framework/src/Illuminate/Config/Repository.php 第 24 行

提前谢谢你。

【问题讨论】:

  • 你更新你的 Laravel 版本了吗?手动删除bootstrap/cache/compiled.php,然后重试。
  • 你的php版本是什么?
  • @ViralSolani 根据消息,它看起来更新。

标签: php laravel-5.3


【解决方案1】:

已解决 重命名位于bootstrap/cache/ 中的cache.php 文件。 在此之后,如果仍然无法运行,请运行 php artisan config:cache 命令。

【讨论】:

    【解决方案2】:

    在 Laravel 5.5 中通过删除 bootstrap/cache 文件夹中的 config.php 文件然后运行 ​​php artisan config:cache 解决了这个问题

    【讨论】:

      【解决方案3】:

      在你的 config/***.php 文件中,第一行必须是

      <?php
      

      不是

      <?
      

      【讨论】:

        猜你喜欢
        • 2014-07-23
        • 1970-01-01
        • 2019-03-04
        • 2013-11-23
        • 2014-01-29
        • 2019-08-23
        • 2021-07-20
        • 2018-04-19
        • 1970-01-01
        相关资源
        最近更新 更多