Skip to content

Commit

Permalink
patch temp directory location
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayokunle Odusan authored and codyfinegan committed Mar 25, 2024
1 parent 4a77798 commit 952116d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/PhpSpreadsheet/Shared/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ public static function realpath(string $filename): string
*/
public static function sysGetTempDir(): string
{
// Totara hack!
if (function_exists('make_temp_directory')) {
$temp = make_temp_directory('phpspreadsheet');
return realpath(dirname($temp));
}

$path = sys_get_temp_dir();
if (self::$useUploadTempDirectory) {
// use upload-directory when defined to allow running on environments having very restricted
Expand Down

0 comments on commit 952116d

Please sign in to comment.