From 3387d8fdd2dd9f2dc2dd610b5cabd07064f54c81 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 2 Oct 2018 17:14:05 +0200 Subject: [PATCH] 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 --- application/xlsxwriter.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/xlsxwriter.class.php b/application/xlsxwriter.class.php index c578e193d..e6acafe60 100644 --- a/application/xlsxwriter.class.php +++ b/application/xlsxwriter.class.php @@ -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; }