You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Illuminate\Http\Client\PendingRequest::withHeaders(): Argument #1 ($headers) must be of type array, null given, called in /var/www/prod/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php on line 390
at vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:311
307▕ *
308▕ * @param array $headers
309▕ * @return $this
310▕ */
➜ 311▕ public function withHeaders(array $headers)
312▕ {
313▕ return tap($this, function ($request) use ($headers) {
314▕ return $this->options = array_merge_recursive($this->options, [
315▕ 'headers' => $headers,
I have seen that many have problems with the Http facade. You could try using the exclude array in the opcache.php file in the config folder, although I don't know if this array allows you to indicate the path to an entire folder to exclude. I should clarify that I have not had that problem in both laravel 8 and laravel 9.
In general, when the library has failed me, it is when I try to add it to an already advanced project. Sometimes I create a clean Laravel project and then I add little by little the code of the base project until I detect where the file that cannot be compiled is.
php artisan opcache:status
TypeError
Illuminate\Http\Client\PendingRequest::withHeaders(): Argument #1 ($headers) must be of type array, null given, called in /var/www/prod/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php on line 390
at vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:311
307▕ *
308▕ * @param array $headers
309▕ * @return $this
310▕ */
➜ 311▕ public function withHeaders(array $headers)
312▕ {
313▕ return tap($this, function ($request) use ($headers) {
314▕ return $this->options = array_merge_recursive($this->options, [
315▕ 'headers' => $headers,
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
The text was updated successfully, but these errors were encountered: