Bug #23197 New

upload file directory synchronization fails when file names include special chars

Version: 2.7.1 Reporter: bypr3

the sync fails silently when file names have special chars. That is because var EE = '.json_encode($this->global_vars).' in EE_Javascript fails.

To prevent this I added

function utf8_encode_callback($value='')
 return utf8_encode($value);
$vars['dirs'][$id]['files'] = array_map( "utf8_encode_callback", $vars['dirs'][$id]['files']);

into Content_files->sync_directory() but you probably know how to do it better 😊

  • Nobody has said anything yet.

You must be signed in to comment on a bug report.

ExpressionEngine News

#eecms, #events, #releases