Skip to content
New issue

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

CharsetConverter::convert should not try to convert numeric value #287

Closed
delmicio opened this issue Mar 20, 2018 · 1 comment
Closed

CharsetConverter::convert should not try to convert numeric value #287

delmicio opened this issue Mar 20, 2018 · 1 comment

Comments

@delmicio
Copy link

Issue summary

After updating from 9.1.2 to 9.1.3 my code is no longer working without error.

System informations

Information Description
League\Csv 9.1.3
PHP 7.1.12
ubuntu 16.04

Standalone code, or other way to reproduce the problem

$formatter = (new Csv\CharsetConverter())
    ->inputEncoding('utf-8')
    ->outputEncoding('Windows-1252');
$csvWriter = Csv\Writer::createFromFileObject(new \SplFileObject('php://output', 'w'));
$csvWriter->addFormatter($formatter);
$csvWriter->insertOne(['str', '1', 2]); 

Expected result

No errors.

Actual result

Type error: mb_convert_encoding() expects parameter 1 to be string, integer given at /var/www/vendor/league/csv/src/CharsetConverter.php:217

nyamsprod added a commit that referenced this issue Mar 21, 2018
@nyamsprod nyamsprod changed the title 9.1.3 broke my code CharsetConverter::convert should not try to convert numeric value Mar 21, 2018
nyamsprod added a commit that referenced this issue Mar 26, 2018
* bug fix issue #287
@nyamsprod
Copy link
Member

Bug fixed in the master branch .. a patch version will be released later this week with the bug fix.

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

No branches or pull requests

2 participants