Skip to content

Commit

Permalink
Update FileManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-jennings authored Jan 22, 2020
1 parent 1007890 commit a9e0ae1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Console/Assets/FileManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ public function run()
]
]);

// php 7.4 filemanager fixes
File::insertAtLine($this->_baseFolder . '/UploadHandler.php', [
495 => [
' if (!$content_range) return $name;'
]
]);
File::replaceString(
$this->_baseFolder . '/UploadHandler.php',
'$uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]);',
'$uploaded_bytes = $this->fix_integer_overflow($content_range ? (int)$content_range[1] : 0);'
);

// remove conflicting response class
unlink($this->_baseFolder . '/include/Response.php');
$clearResponseFile = fopen($this->_baseFolder . '/include/Response.php', 'w');
Expand Down Expand Up @@ -89,4 +101,4 @@ protected function _backupOldConfigFiles($uploadPath)
}
}
}
}
}

0 comments on commit a9e0ae1

Please sign in to comment.