You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP 8.4 deprecated omitting fputcsv()'s $escape parameter — the implicit default has historically been \ (backslash), a non-standard, PHP-specific escaping convention for quote characters embedded in CSV fields. A future PHP version will change the default to an empty string.
The codebase currently calls fputcsv() with an explicit $escape = '\' to preserve the existing (legacy) behavior and avoid the PHP 8.4 deprecation warning. This keeps output byte-for-byte identical to before, but it means any CSV export containing a literal double-quote character inside a field will produce a file using PHP's backslash-escaping dialect, which most non-PHP tools (Excel, Google Sheets, pandas, etc.) do not expect — the RFC 4180 standard escapes an embedded quote by doubling it (""), not by prefixing it with a backslash.
Proposed solution
Switch fputcsv() calls to $escape = '' (empty string), which makes PHP use pure RFC 4180 double-quote escaping instead of its legacy backslash convention. This is the more broadly compatible, standards-correct behavior for CSV files intended to be opened outside of PHP.
This is a deliberate behavior change (not just a compatibility shim), so it should be called out in release notes: any field containing a literal " character will be escaped differently in exported CSVs after this change (double " instead of backslash-prefixed ").
Status: Cannot confirm — the referenced code doesn't exist on master.
The issue points to app/Helpers/export_helper.php and a write_export_csv() function as the location of the legacy fputcsv() backslash-escaping behavior. I checked app/Helpers/ on master and there is no export_helper.php file there (directory listing: attribute_helper.php, dompdf_helper.php, importfile_helper.php, locale_helper.php, migration_helper.php, report_helper.php, sale_helper.php, security_helper.php, tabular_helper.php, tax_helper.php, url_helper.php). A repo-wide code search for fputcsv and write_export_csv also returns no matches outside of an unrelated test fixture (tests/Controllers/CustomersCsvImportTest.php, which writes a CSV for test input, not an export).
This suggests the "server-side manage-table export" feature described as the context for this issue hasn't been merged into master yet (or lives under a different name/path than described), so I can't verify whether the specific backslash-vs-RFC-4180 escaping behavior is present or fixed. Flagging as inconclusive rather than asserting a status — a maintainer may want to confirm whether this issue is still scoped correctly against current master.
Activity
objecttothis commentedon Oct 23, 2026
Claude Issue Checker Agent (cc @objecttothis)
Investigated against current
master.Status: Cannot confirm — the referenced code doesn't exist on
master.The issue points to
app/Helpers/export_helper.phpand awrite_export_csv()function as the location of the legacyfputcsv()backslash-escaping behavior. I checkedapp/Helpers/onmasterand there is noexport_helper.phpfile there (directory listing:attribute_helper.php,dompdf_helper.php,importfile_helper.php,locale_helper.php,migration_helper.php,report_helper.php,sale_helper.php,security_helper.php,tabular_helper.php,tax_helper.php,url_helper.php). A repo-wide code search forfputcsvandwrite_export_csvalso returns no matches outside of an unrelated test fixture (tests/Controllers/CustomersCsvImportTest.php, which writes a CSV for test input, not an export).This suggests the "server-side manage-table export" feature described as the context for this issue hasn't been merged into
masteryet (or lives under a different name/path than described), so I can't verify whether the specific backslash-vs-RFC-4180 escaping behavior is present or fixed. Flagging as inconclusive rather than asserting a status — a maintainer may want to confirm whether this issue is still scoped correctly against currentmaster.