sanitizeStreamFilter breaks stream filters with new-line characters in their arguments #122

HeyRatFans opened this Issue Oct 13, 2015 · 1 comment


None yet
2 participants

HeyRatFans commented Oct 13, 2015

When using appendStreamFilter or prependStreamFilter the name of the filter is sanitised by the sanitizeStreamFilter. This method currently casts the name to a string, trims and returns it.

Trimming the string removes any trailing new-lines or other invisible characters like NULLs or white-space to be removed. This causes problems for filters that expect these characters to be used as arguments. For example a filter that uses str_replace to convert Windows-style line endings (\r\n) to Linux-style (\n) cannot be used because the trailing \n gets removed by the trim call.

This issue affects release 7.1.2 of thephpleague/csv and is known to be present on both PHP 5.6.10 on Ubuntu 14.04 and 5.5.25 on Windows 7.


This comment has been minimized.

Show comment
Hide comment

nyamsprod Oct 22, 2015


This issue is resolved in the master branch


nyamsprod commented Oct 22, 2015

This issue is resolved in the master branch

@nyamsprod nyamsprod closed this Oct 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment