Closed Hardys- closed 1 year ago
Hi @Hardys-, thank you for creating this issue.
I'm surprised that you get this error using PHP 7.4; trailing commas are permitted in function calls since PHP 7.3; 7.3 is the minimum supported version for this library. I wonder if there is something significant about using PHP-FPM. Of course it would be an easy fix as you suggested.
I could not reproduce the problem using the php:7.4-fpm
Docker image. Can you please share the error message you get?
Sure thing, the message said
Parse error: syntax error, unexpected ')' in /usr/share/nginx/html/php/vendor/deeplcom/deepl-php/src/Translator.php on line 233
However, I think there might be some issue with my docker image, I tried to re-build the php: 7.4-fpm
and I cannot reproduce the problem either.
Will close this and keep posted if I find something new. Thanks!
I get a syntax error when calling:
and if you look into the file
deepl-php/src/Translator.php
at Line 552 and Line 559 shown as below:Remove the comma right after the message will fix it :
Just in case anyone has the same issue, so I posted it here :)