LaraBug / LaraBug

Laravel error reporting tool
https://www.larabug.com
MIT License
267 stars 58 forks source link

php artisan config:cache exception #93

Open djlimix opened 10 months ago

djlimix commented 10 months ago

Hello,

I've been trying to cache my Laravel config files, however, it fails with this exception:

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /***/vendor/larabug/larabug/src/LaraBug.php:118

When I checked the error line, there is this:

if (count(config('larabug.environments')) == 0) {
    return true;
}

However, in config, I have this:

'environments' => [
        'production',
],

Therefore, I do not understand why it returns null.

My Laravel version is 10, my Larabug version is 3.0.