Skip to content

Commit

Permalink
Fixed issue: Statistics show error 500 when exporting to Excel
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 12, 2018
1 parent b687776 commit a4368f3
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions application/third_party/pear/OLE/PPS/System.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<?php
class System {
public function tmpdir() {
if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); }
if (!empty($_ENV['TMPDIR'])) { return realpath( $_ENV['TMPDIR']); }
if (!empty($_ENV['TEMP'])) { return realpath( $_ENV['TEMP']); }
$tempfile=tempnam(__FILE__,'');
if (file_exists($tempfile)) {
unlink($tempfile);
return realpath(dirname($tempfile));
}
return sys_get_temp_dir();
}
<?php
class System {
public function tmpdir() {
if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); }
if (!empty($_ENV['TMPDIR'])) { return realpath( $_ENV['TMPDIR']); }
if (!empty($_ENV['TEMP'])) { return realpath( $_ENV['TEMP']); }
return sys_get_temp_dir();
}
}

0 comments on commit a4368f3

Please sign in to comment.