Bug #23197 Version Retired

upload file directory synchronization fails when file names include special chars

Version: 2.7.1 Reporter: bypr3

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

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.
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases