Fix XLSX export failing on PHP 7.1 on systems without "/tmp" path

Since PHP 7.1 tempnam() throws a notice if the dir parameter can't be used : bug #69489 in http://php.net/ChangeLog-7.php#7.1.0
This commit is contained in:
Pierre Goiffon
2018-10-02 17:14:05 +02:00
parent 9f926fccd8
commit 3387d8fdd2

View File

@@ -40,7 +40,7 @@ Class XLSXWriter
protected function tempFilename()
{
$filename = tempnam("/tmp", "xlsx_writer_");
$filename = tempnam(SetupUtils::GettmpDir(), 'xlsx_writer_');
$this->temp_files[] = $filename;
return $filename;
}