We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
First, thanks for a great package! This has saved me a lot of time!
I have found a bug with incorrect return types. I will look into it myself, but wanted to start the issue here.
File: src/Api/StichozaApiTranslate.php:30
StichozaApiTranslate->translate has a return type of string. But the GoogleTranslate->handle can return null or string (See method return type)
Also, the StichozaApiTranslate->translate returns false in the try catch. This will break at some point too.
Do you think we should go for: If a translation cannot be found for whatever reason, is the expected behaviour to return null instead of a string?
The text was updated successfully, but these errors were encountered:
The specific translation I have is an empty string:
This is the only line that fails, which is likely why GoogleTranslate returned null instead of a string.
Sorry, something went wrong.
TypeError: Tanmuhittin\LaravelGoogleTranslate\Api\StichozaApiTranslat…
e160f88
…e::translate(): Return value must be of type string, null returned (Most recent call first)
No branches or pull requests
First, thanks for a great package! This has saved me a lot of time!
I have found a bug with incorrect return types. I will look into it myself, but wanted to start the issue here.
File: src/Api/StichozaApiTranslate.php:30
StichozaApiTranslate->translate has a return type of string. But the GoogleTranslate->handle can return null or string (See method return type)
Also, the StichozaApiTranslate->translate returns false in the try catch. This will break at some point too.
Do you think we should go for: If a translation cannot be found for whatever reason, is the expected behaviour to return null instead of a string?
The text was updated successfully, but these errors were encountered: