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

Undefined offset error (fresh install) #163

Open
nunodonato opened this issue Feb 9, 2022 · 1 comment
Open

Undefined offset error (fresh install) #163

nunodonato opened this issue Feb 9, 2022 · 1 comment

Comments

@nunodonato
Copy link

Hi
I've just installed this package in a laravel 7 app (php 7.3). All ok, except when I run php artisan lang:js
this is what I get:

In LangJsGenerator.php line 215:
                       
  Undefined offset: 3  

The only thing different in this project is that the vendor folder is outside the main project folder. Not sure if could be related
Any tips?

@nunodonato
Copy link
Author

nunodonato commented Feb 9, 2022

Further digging into it revealed its a problem with a vendor translation that has a .php file mixed with other .json files.
The code that converts the file names to keys is expecting a 4 character extension, and gets confused when it meets the .php file

this is in LangJsGenerator.php
$key = substr($pathName, 0, -4);

@nunodonato nunodonato reopened this Feb 9, 2022
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