Closed alexminza closed 1 year ago
@ChR1sMC suggests a great article here :) https://eidson.info/post/php_eol_is_broken
@ChR1sMC suggests a great article here :) https://eidson.info/post/php_eol_is_broken
Thx @alexminza , I replaced the code of the library on my server, as article suggests:
To Replace:
$lines = explode(PHP_EOL, $str);
With:
$lines = preg_split('/\n|\r\n?/', $str);
And I can confirm that my issue has been fixed !
I replaced the code of the library on my server, as article suggests
@ChR1sMC can you please submit a PR for this?
Will do, thank you
On Mon, 29 May 2023 at 14:56, Alexander Minza @.***> wrote:
I replaced the code of the library on my server, as article suggests
@ChR1sMC https://github.com/ChR1sMC can you please submit a PR for this?
— Reply to this email directly, view it on GitHub https://github.com/maibank/maibapi/issues/3#issuecomment-1567039918, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALRQOR56VXRH4YQDLDUGQILXISFE7ANCNFSM6AAAAAAYQIYR7Y . You are receiving this because you were mentioned.Message ID: @.***>
It seems that there was just a release with this modification implemented directly in the code, without any PR or issue mentioned.
@maib-ecomm please use branches and PR merging along with issues mentioning to allow proper tracking for the fixes.
Hi! Thank you! Fixed in 2.0.4 / 3.0.4
See original issue: https://github.com/alexminza/wc-moldovaagroindbank/issues/29
They are running on a Windows server - thus
PHP_EOL
is defined differently andexplode(PHP_EOL...
does not properly parse the response from a *nix server.https://github.com/maibank/maibapi/blob/main/src/MaibApi/MaibClient.php#LL77