mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
Fixing bug where uploading large files sometimes fails (#3761)
Sometimes uploading large files fails with the following error: Unsupported operand types: string + int {"userId":2,"exception":"[object] (TypeError(code: 0): Unsupported operand types: string + int at <path>/vendor/studio-42/elfinder/php/elFinder.php:4476).
The function file_get_contents returns a string, and PHP 8 doesn't do implicit conversion. It requires the conversion to be explicit to not give problems.
This commit is contained in:
@@ -4511,7 +4511,7 @@ var go = function() {
|
||||
foreach ($hashes as $hash) {
|
||||
$lock = elFinder::$commonTempPath . DIRECTORY_SEPARATOR . self::filenameDecontaminate($hash) . '.lock';
|
||||
if ($this->itemLocked($hash)) {
|
||||
$cnt = file_get_contents($lock) + 1;
|
||||
$cnt = (int)file_get_contents($lock) + 1;
|
||||
} else {
|
||||
$cnt = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user