From 6e6c68e7b3e294d9e8a1acd921ca4a039db56aa6 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Fri, 9 Oct 2020 14:52:01 +0200 Subject: [PATCH] Let's try to figure out why we're having an issue with a temp csv file --- src/PhpSpreadsheet/Reader/Csv.php | 1 + tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/PhpSpreadsheet/Reader/Csv.php b/src/PhpSpreadsheet/Reader/Csv.php index db2b50b9..30b39a9b 100644 --- a/src/PhpSpreadsheet/Reader/Csv.php +++ b/src/PhpSpreadsheet/Reader/Csv.php @@ -522,6 +522,7 @@ class Csv extends BaseReader // Attempt to guess mimetype $type = mime_content_type($pFilename); + var_dump($type); $supportedTypes = [ 'text/csv', 'text/plain', diff --git a/tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php b/tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php index d048183c..d4799356 100644 --- a/tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php @@ -153,6 +153,7 @@ class CsvEnclosureTest extends Functional\AbstractFunctional $writer->save($filename); $filedata = file_get_contents($filename); $filedata = preg_replace('/\\r/', '', $filedata); + var_dump($filedata); $reader = new CsvReader(); $reader->setDelimiter($delimiter); $reader->setEnclosure($enclosure);