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 /spatie/laravel-multitenancy/src/Actions/MakeQueueTenantAwareAction.php:79) #513
Replies: 1 comment
-
have you ran the configuration file into your config folder? you should have a config/multitenancy.php file you will need to run:
after running the above, refresh the config using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been getting thousands of this error since yesterday. However, I can't seem to figure out where it is coming from.
Within MakeQueueTenantAwareAction.php on line 79, there is:
if (in_array($reflection->name, config('multitenancy.tenant_aware_jobs'))) {
So, according to the error, the
config('multitenancy.tenant_aware_jobs')
should be null.However, when I go to
vendor/spatie/laravel-multitenancy/config/multitenancy.php
I can see that the tenant_aware_jobs is an empty array:Looking at my failed_jobs table, this seems to be coming from
App\\Notifications\\ActionCompleted
, which I haven't touched in months. Furthermore, within the payload, I can see that thetenantId
is present. So, that shouldn't be the issue.I have tried to fix it by restarting the queue. Also, running
php artisan queue:monitor default
gives me Size / Status of[0] OK
.Has anone seen this issue before?
Thanks!
Full error:
Beta Was this translation helpful? Give feedback.
All reactions