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

Avoid conversion errors if a character is unknown, such as apostrophe #25

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Controller/Admin/ExportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
while ($file->valid()) {
echo $file->fread(1024);
}
$content = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', ob_get_clean());
$content = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', ob_get_clean());

Check failure on line 46 in src/Controller/Admin/ExportController.php

View workflow job for this annotation

GitHub Actions / Quality tests (PHP 8.0)

Parameter #3 $string of function iconv expects string, string|false given.

Check failure on line 46 in src/Controller/Admin/ExportController.php

View workflow job for this annotation

GitHub Actions / Quality tests (PHP 8.1)

Parameter #3 $string of function iconv expects string, string|false given.
echo str_replace("\n", "\r\n", str_replace("\r", '', $content));

Check failure on line 47 in src/Controller/Admin/ExportController.php

View workflow job for this annotation

GitHub Actions / Quality tests (PHP 8.0)

Parameter #3 $subject of function str_replace expects array|string, string|false given.

Check failure on line 47 in src/Controller/Admin/ExportController.php

View workflow job for this annotation

GitHub Actions / Quality tests (PHP 8.1)

Parameter #3 $subject of function str_replace expects array|string, string|false given.
},
200,
[
Expand Down
Loading