• Welcome to Simple Machines Community Forum. Please login or sign up.
October 26, 2021, 09:00:38 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


SMF 2.1 RC3 md5_file and array to string conversion error

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

Previous topic - Next topic

Rock Lee Code

December 01, 2020, 08:07:59 PM Last Edit: October 14, 2021, 08:32:11 PM by Diego Andrés
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 © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: