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

array_replace_recursive(): Argument #2 must be of type array, int given #3

Open
kropcik opened this issue Sep 25, 2024 · 2 comments · May be fixed by #4
Open

array_replace_recursive(): Argument #2 must be of type array, int given #3

kropcik opened this issue Sep 25, 2024 · 2 comments · May be fixed by #4

Comments

@kropcik
Copy link

kropcik commented Sep 25, 2024

  TypeError

  array_replace_recursive(): Argument #2 must be of type array, int given

  at vendor\laravel\framework\src\Illuminate\Translation\FileLoader.php:129
    125▕     {
    126▕         return collect($paths)
    127▕             ->reduce(function ($output, $path) use ($locale, $group) {
    128▕                 if ($this->files->exists($full = "{$path}/{$locale}/{$group}.php")) {
  ➜ 129▕                     $output = array_replace_recursive($output, $this->files->getRequire($full));
    130▕                 }
    131▕
    132▕                 return $output;
    133▕             }, []);

  1   vendor\laravel\framework\src\Illuminate\Translation\FileLoader.php:129

  2   vendor\laravel\framework\src\Illuminate\Collections\Traits\EnumeratesValues.php:791

When scannable locale does have a file but it's empty (not an array). If you are busy, I'll make pull request whenever I have time.

@nerg4l
Copy link
Member

nerg4l commented Sep 27, 2024

@kropcik Thank you for opening this issue. I will look into this and try to fix it as soon as possible.

@nerg4l nerg4l linked a pull request Sep 29, 2024 that will close this issue
@nerg4l
Copy link
Member

nerg4l commented Sep 29, 2024

@kropcik, could you check if the fix proposed in #4 works for you?

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

Successfully merging a pull request may close this issue.

2 participants