News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF 2.1 RC3 md5_file and array to string conversion error

Started by -Rock Lee-, December 01, 2020, 08:07:59 PM

Previous topic - Next topic

-Rock Lee-

I'm not sure if it's an error on my server or something specific, but I have these errors repeatedly.

In the file ShowAttachments.php in line 156 it appears that:
$file['filePath'] = !file_exists($file['filePath']) && isset($filePath['extension']) ? substr($file['filePath'], 0, -(strlen($filePath['extension']) + 1)) : $file['filePath'];
$file['etag'] = '"' . md5_file($file['filePath']) . '"';


In the file Subs.php in line 4456 it appears that:
// Are we using multiple directories?
if (is_array($modSettings['attachmentUploadDir']))
$path = $modSettings['attachmentUploadDir'][$dir];

else
$path = $modSettings['attachmentUploadDir'];
return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
}


I am trying a conversion from 2.0 to 2.1 (It is my own server of tests) and it seems all the other users I had no problem with only some specific ones, it seems that it cannot convert or read the file correctly... more info PHP: 7.4.10, MySQL version: 10.6 and Server Version: Apache.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: