I'm sending a .ods file name into the makeFileName method to get a unique string value for the file name. but it return a file name which is not ending in .ods instead it end with
.unknown
.Ex:
template_ods_65c986571c9c2737fff370ce4a745015.unknown
but i need a file name like
template_65c986571c9c2737fff370ce4a745015.ods
.Other thing is when i assign a returned string value into a variable, it gives me the array to string conversion error. code
$newName = CRM_Utils_File::makeFileName($value['name']);
Error
Array to string conversion in /var/www/html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 554
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 556
I confused with these two error, i'll appreciate if someone could help me to resolve it