edifact
edifact copied to clipboard
Fatal error on integer-value segments for Encoder
First of all, many thanks for your efforts! Better to drop argument type for Encoder::escapeValue as compatibility is broken when the source array contains integers.
private function escapeValue( >>string<< &$str): string Fatal error: Uncaught TypeError: Argument 1 passed to EDI\Encoder::escapeValue() must be of the type string, integer given
You're right! Would you like to provide a pull request?
cc @voku
@konovalovk can you provide a example, thanks!
PS: here is a possible fix but it needs a real world example for the tests: https://github.com/voku/edifact/commit/a25a74d283656b940cf0e914bc2f9353d7692310