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

Empty array on lang file throws offset error when syncing #82

Open
lacrc opened this issue Nov 6, 2018 · 2 comments
Open

Empty array on lang file throws offset error when syncing #82

lacrc opened this issue Nov 6, 2018 · 2 comments

Comments

@lacrc
Copy link

lacrc commented Nov 6, 2018

  • Laravel Version: 5.7.12
  • PHP Version: 7.2.9

Description:

By far not an urgent issue, just thought I should report that running php artisan langman:sync throws ErrorException : Undefined offset: 2 when "Synchronizing language files..." if you have any php lang file that only returns an empty array.

Steps to reproduce:

  • Create a .php file in any of your lang folders;
  • Edit it so it returns just an empty array:
<?php

return [
    //
];
  • Run php artisan langman:sync
@thanosalexander
Copy link

is there any fix about this?

@lacrc
Copy link
Author

lacrc commented Jul 27, 2019

what I did was create a dummy entry on every new file like:

<?php

return [
    '' => ''
];

Sync ran successfully after that.

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