From 773895ec3b34c8c0ae4067731f48bbcffa348f85 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Fri, 15 Apr 2022 02:30:49 +0000 Subject: [PATCH 1/2] * Fix bug #11376. --- module/file/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/file/model.php b/module/file/model.php index 2532df4ce2..44a5e245ff 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -623,7 +623,7 @@ class fileModel extends model $line = str_replace('""', '"', $line); /* if only one column then line is the data. */ - if(strpos($line, ',') === false and $col == -1) + if(strpos($line, ',') === false and substr($line, 0, 1) != '"' and $col == -1) { $data[$row][0] = trim($line, '"'); } From 91aeb0a5b34ab86adcd2b03d8d9a24923aa45825 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Fri, 15 Apr 2022 02:35:39 +0000 Subject: [PATCH 2/2] * Adjust code. --- module/file/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/file/model.php b/module/file/model.php index 44a5e245ff..38242c70aa 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -623,7 +623,7 @@ class fileModel extends model $line = str_replace('""', '"', $line); /* if only one column then line is the data. */ - if(strpos($line, ',') === false and substr($line, 0, 1) != '"' and $col == -1) + if(strpos($line, ',') === false and $line[0] != '"' and $col == -1) { $data[$row][0] = trim($line, '"'); }