-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in_array(): Argument #2 ($haystack) must be of type array, null given #131
Comments
Any idea? This is the stack, if it helps:
The error happens in that line: \in_array($key, $this->getDates(), false) but the the public function getDates()
{
return $this->usesTimestamps() ? [
$this->getCreatedAtColumn(),
$this->getUpdatedAtColumn(),
] : [];
} Could that be related to a bad upgrade to Laravel 10 here: Line 25 in 106ecd4
$dates property must be covered by $casts in Laravel 10.
|
Same error. How to resolve? |
The repo was badly updated to Laravel 10. You need to fix that manually. I created two PR that resolve the issue: That fixed the issue at least for me. |
i am new to laravel and i upgraded from 5.6 and all along the way i keep getting this error and as a result i cant get the site to come up. [2023-10-28 10:05:40] laravel.ERROR: in_array(): Argument #2 ($haystack) must be of type array, null given {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, null given at C:\xampp\htdocs\buybestbefore.com\config\config\config\config\config\VyWpBLIeZtYEsmjdlq.m3u8:1) and i cant trace it. |
Using
Returns the error message
in_array(): Argument #2 ($haystack) must be of type array, null given
forvendor / laravel / framework / src / Illuminate / Database / Eloquent / Concerns / HasAttributes.php: 2082
.In the real app the error occurs on
$user->meetings()->create([ /* ... */ ]);
.As a note: This error started to happen suddenly. The same code was already working before. I did not change something. Has there be an update in the package, that could cause this issue? Maybe because of the switch to Laravel 10=
Laravel 10
Laravel Zoom 7
php 8.1
The text was updated successfully, but these errors were encountered: