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

[PHP 8.4] fputcsv() - The $escape parameter must be provided as its default value will change #4298

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

ADDISON74
Copy link
Contributor

Starting with PHP version 8.4 the fifth parameter of the fputcsv() function must be specified, otherwise the following message will be displayed

Deprecated functionality: fputcsv(): the $escape parameter must be provided as its default value will change  in /var/www/html/app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php on line 108 in /var/www/html/app/code/core/Mage/Core/functions.php:197

The PHP default value for the escape parameter is '\\' and I declared it at the beginning in some files.

Since we support the PHP version 7.4, I did not use escape: in front of the variable like others who provided similar solutions.

Deprecated. The PHP default value for the escape parameter is '\\' and I declared it at the beginning in certain files.
Deprecated. Deprecated. The $escape parameter must be provided as its default value will change.
Deprecated. The $escape parameter must be provided as its default value will change.
…ct.php

Deprecated. The $escape parameter must be provided as its default value will change.
Deprecated. The $escape parameter must be provided as its default value will change.
@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: ImportExport Relates to Mage_ImportExport Component: lib/* Relates to lib/* Component: lib/Magento Relates to lib/Magento labels Oct 19, 2024
@ADDISON74 ADDISON74 linked an issue Oct 19, 2024 that may be closed by this pull request
lib/Varien/File/Csv.php Outdated Show resolved Hide resolved
lib/Varien/Io/File.php Outdated Show resolved Hide resolved
Co-authored-by: Sven Reichel <[email protected]>
@sreichel
Copy link
Contributor

Pls run ddev composer run php-cs-fixer:fix

@ADDISON74
Copy link
Contributor Author

@sreichel - All green now.

@sreichel sreichel added the PHP 8.4 Relatee to PHP 8.4 label Oct 20, 2024
@kiatng kiatng merged commit 4fdf499 into OpenMage:main Oct 22, 2024
18 checks passed
@ADDISON74 ADDISON74 deleted the fputcsv branch October 22, 2024 07:35
fballiano added a commit to MahoCommerce/maho that referenced this pull request Oct 22, 2024
fballiano added a commit to MahoCommerce/maho that referenced this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ImportExport Relates to Mage_ImportExport Component: lib/Magento Relates to lib/Magento Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* PHP 8.4 Relatee to PHP 8.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PHP 8.4] Export feature - No valid data sent
3 participants