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

strlen() expects parameter 1 to be string, array given #34

Open
peinfant54 opened this issue Apr 7, 2020 · 0 comments
Open

strlen() expects parameter 1 to be string, array given #34

peinfant54 opened this issue Apr 7, 2020 · 0 comments

Comments

@peinfant54
Copy link

Hello.

I'm using laravel 5.7 and php 7.2, and when I execute "php artisan autotrans:missing", I get the following:

**root@c3ac4083fd6f:/var/www# php artisan autotrans:missing
Found 1 language to translate

ErrorException : strlen() expects parameter 1 to be string, array given

at /var/www/vendor/ben182/laravel-auto-translate/src/Commands/MissingCommand.php:57
53| foreach ($targetLanguages as $targetLanguage) {
54| $missing = $this->autoTranslator->getMissingTranslations($targetLanguage);
55| $missingCount += $missing->count();
56| $strLen += $missing->map(function ($value) {

57| return strlen($value);
58| })->sum();
59| $this->line('Found '.$missing->count().' missing keys in '.$targetLanguage);
60| }
61|

Exception trace:

1 strlen([])
/var/www/vendor/ben182/laravel-auto-translate/src/Commands/MissingCommand.php:57

2 Ben182\AutoTranslate\Commands\MissingCommand::Ben182\AutoTranslate\Commands{closure}([], "validation.attributes")
[internal]:0

Please use the argument -v to see more details.**

Do you know where can my problem be?.

Thanks

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

1 participant