Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate
This commit is contained in:
parent
58ca5d112d
commit
cb68c95504
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -162,10 +163,10 @@ function createFileFromChunks($temp_dir, $upload_dir, $fileName, $chunkSize, $to
|
|||
|
||||
// check that all the parts are present
|
||||
// the size of the last part is between chunkSize and 2*$chunkSize
|
||||
if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) {
|
||||
if ($total_files * (float) $chunkSize >= ((float) $totalSize - (float) $chunkSize + 1)) {
|
||||
// create the final destination file
|
||||
if (($fp = fopen($upload_dir.'/'.$fileName, 'w')) !== false) {
|
||||
for ($i=1; $i<=$total_files; $i++) {
|
||||
for ($i = 1; $i <= $total_files; $i++) {
|
||||
fwrite($fp, file_get_contents($temp_dir.'/'.$fileName.'.part'.$i));
|
||||
dol_syslog('writing chunk '.$i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue