Skip to content
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

error buildArchiveOptions() must be of the type array #24

Closed
normeno opened this issue Aug 5, 2020 · 3 comments
Closed

error buildArchiveOptions() must be of the type array #24

normeno opened this issue Aug 5, 2020 · 3 comments

Comments

@normeno
Copy link

normeno commented Aug 5, 2020

Hi,

I was doing the same simple test via tinker on 2 different machines, and I get different results.

image

image

What is going wrong?

The version of Laravel is the same, the only difference I see is that in the test that does not fail, the version of php is 7.2.10, and the one that fails is 7.2.24

@jszobody
Copy link
Member

jszobody commented Aug 5, 2020

Hmm so the buildArchiveOptions() is getting null instead of an array.

When the service provider calls this method it is passing in $app['config']->get('zipstream.archive').

If you look at the config file that is an array.

Have you published the config file locally and modified it perhaps?

Worth trying config('zipstream.archive') in your tinker session and seeing what you have there, it needs to be an array.

@normeno
Copy link
Author

normeno commented Aug 5, 2020

It is correct, in one project it returns an array, in another it returns null.

image

image

The strange thing is that it is the same project, so the settings are the same

@jszobody
Copy link
Member

jszobody commented Aug 5, 2020

Maybe try php artisan config:clear?

Not sure what to tell you if that doesn't fix it. You're definitely dealing with an issue of config not being loaded, which is outside the scope of this specific package. Once you figure out the config issue, you should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants