iconv_set_encoding deprecated on PHP 5.6

Created on 26 April 2017, almost 8 years ago
Updated 6 November 2023, over 1 year ago

Problem/Motivation

The db log is now full of error messages:
Deprecated function: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in MarketplaceWebServiceProducts_Client->__construct() (line 848 of /home/vnb/public_html/sites/all/modules/amazonMWS/libraries/nonapod/AmazonMWS/MarketplaceWebServiceProducts/Client.php).

I claim this was triggered by a hoster changing the default PHP version to 5.6. The error is not reported on PHP 5.4.3

Note that the actual error is in the external Nanopod library code and not the MWS module.

The offending code is:

        iconv_set_encoding('output_encoding', 'UTF-8');
        iconv_set_encoding('input_encoding', 'UTF-8');
        iconv_set_encoding('internal_encoding', 'UTF-8');

Proposed resolution

Not sure? I have not yet investigated the fix.

🐛 Bug report
Status

Active

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024