Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

strpos(): Argument #1 ($haystack) must be of type string, array given on \vendor\fruitcake\laravel-cors #565

Closed
codeOraaange opened this issue Jun 3, 2022 · 2 comments

Comments

@codeOraaange
Copy link

codeOraaange commented Jun 3, 2022

I use PHP 8.0.8 and Laravel 8.65, when start project get error like this. I confuse for solve this problem. After research mostly because disable mbstring extension, i'm make sure for this enable in php.ini file. Can u help me?
strpos-fruitcake-php8

@mfn
Copy link

mfn commented Jun 3, 2022

What does your allowedOrigins config look like? It should only be an array of strings.

@codeOraaange
Copy link
Author

Sorry, this is done after changing the cors.php file,
from:
'allowed_origins' => [explode(',', env('CORS_ALLOWED_ORIGINS', '*'))],

to:
'allowed_origins' => explode(',', env('CORS_ALLOWED_ORIGINS', '*')),

Thanks for looking at this and hope it helps others LOL.

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

No branches or pull requests

2 participants