简体   繁体   中英

Catchable fatal error: Argument 1 passed to Illuminate\Config\Repository::__construct() must be of the type array, integer given

I'm having problem in issuing this command php artisan cache:clear , or php artisan I get this error.

Catchable fatal error: Argument 1 passed to Illuminate\\Config\\Repository::__construct() must be of the type array, integer given integer given, called in /var/www/mysite/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 32 and defined in /var/www/mysite/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 24

Thank you in advance.

Solved Rename your cache.php file, located in bootstrap/cache/ . After this, run php artisan config:cache command if still not working.

在 Laravel 5.5 中通过删除bootstrap/cache文件夹中的config.php文件然后运行php artisan config:cache

In your config/***.php file, the first line must be

<?php

NOT

<?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM