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

getUserToBlamePk() returns null due to referencing .env #18

Open
zenoandras opened this issue Nov 19, 2024 · 1 comment
Open

getUserToBlamePk() returns null due to referencing .env #18

zenoandras opened this issue Nov 19, 2024 · 1 comment

Comments

@zenoandras
Copy link

In certain cases the .env config is not available for the blame to fall back on when calling getUserToBlamePk().
This results in a null result which immediately triggers an unhandled (and uncatchable) error exception as the return value has to be :string.

The solution would be to publish the system_user_id into the public config with a null default value and make it available for project-specific override (to avoid null calls).
It is a preferred Laravel pattern to use config() instead of env() anyways.

zenoandras added a commit to Zenosyne-Technologies/laravel-blame that referenced this issue Nov 19, 2024
zenoandras added a commit to Zenosyne-Technologies/laravel-blame that referenced this issue Nov 19, 2024
@zenoandras
Copy link
Author

zenoandras commented Nov 19, 2024

PR: #19

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