Skip to content

Commit

Permalink
Update FileUpload.php
Browse files Browse the repository at this point in the history
backward compatibility for php7.4 adjustments, issue reported by Michael Mylvaganam
  • Loading branch information
camilord authored Nov 29, 2024
1 parent ac321bd commit 4a2d018
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/IO/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function processUpload($file_element)

/**
* @param string $name -> $_FILES index variable or key value of the array
* @return bool|FileElement
* @return bool|FileElement[]|array
*/
public function processMultiUpload(string $name): array
{
Expand Down Expand Up @@ -137,8 +137,7 @@ private function uploadFile(
string $input_file_name,
string $input_file_tmp,
string $input_file_type
): bool|FileElement
{
) {
$new_filename = $this->tmp_dir_location.'/tmp_'.sha1(time().rand(1,99999)).'_'.time().'.{FILE_EXT}';
$new_filename = SystemUtilus::cleanPath($new_filename);

Expand Down

0 comments on commit 4a2d018

Please sign in to comment.