File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,16 @@ private function getPreviewData(Worksheet $worksheet): array {
168168 || (is_array ($ columns [$ colIndex ])
169169 && $ columns [$ colIndex ]['type ' ] === Column::TYPE_DATETIME )
170170 ) {
171- if (isset ($ columns [$ colIndex ]['subtype ' ])
172- && $ columns [$ colIndex ]['subtype ' ] === Column::SUBTYPE_DATETIME_DATE
171+ if (
172+ ($ column && $ column ->getSubtype () === Column::SUBTYPE_DATETIME_DATE )
173+ || (is_array ($ columns [$ colIndex ])
174+ && $ columns [$ colIndex ]['subtype ' ] === Column::SUBTYPE_DATETIME_DATE )
173175 ) {
174176 $ format = 'Y-m-d ' ;
175- } elseif (isset ($ columns [$ colIndex ]['subtype ' ])
176- && $ columns [$ colIndex ]['subtype ' ] === Column::SUBTYPE_DATETIME_TIME
177+ } elseif (
178+ ($ column && $ column ->getSubtype () === Column::SUBTYPE_DATETIME_TIME )
179+ || (is_array ($ columns [$ colIndex ])
180+ && $ columns [$ colIndex ]['subtype ' ] === Column::SUBTYPE_DATETIME_TIME )
177181 ) {
178182 $ format = 'H:i ' ;
179183 } else {
You can’t perform that action at this time.
0 commit comments