5 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 28   (RSS)

By Steve99 - May 21 - edited: May 21

PHP 7.2 with CSV Export plugin. 
E_WARNING: mb_convert_variables(): Cannot handle recursive references
csvExport.php (line 149)

I researched this error and the only references found were to a PHP bug in version 7.0 during 2016. Bug #73322

Apparently it surfaced again in PHP 7.2? I haven't located any current references.

Thoughts for a possible workaround? (aside from disabling CSVEXPORT_FOR_EXCEL)

Thanks,
Steve

Hey Steve,

I've done some more research into this. I was able to replicate the bug, but only if I added a second encoding to the CSV Import Options, for example:

$GLOBALS['CSV_IMPORT_OPTIONS'] = array(
  'ENCODING'              => 'CP1252,UTF-8', // CP1252, ASCII, ISO-8859-1, UTF-8 - More: http://php.net/manual/en/mbstring.supported-encodings.php
....

Do you have more than one encoding type set in your CSV Import options? If this is the issue, I've got a potential workaround in mind until they patch the bug. 

Greg Thomas
PHP Programmer - interactivetools.com

Hey Greg,

It was actually a reference to the CSV Export plugin line 149:

  // send rows
  foreach ($records as $record) {
    if ($GLOBALS['CSVEXPORT_FOR_EXCEL']) { mb_convert_variables('CP1252', 'UTF-8', $record); }

The error showed up in the export file for every row.

Thanks,
Steve

Hey Greg,

No worries :)  I just submitted the 2nd level support request.

Thanks!

Steve