Skip to content

Commit 4cba663

Browse files
Fix last column dissapear issue when delete header column #808
1 parent 65d97ed commit 4cba663

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

classes/Visualizer/Module/Chart.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,14 @@ private function handleCSVasString( $data, $editor_type ) {
912912
if ( empty( $row ) ) {
913913
continue;
914914
}
915+
$row = explode( ',', $row );
916+
$row = array_map(
917+
function( $r ) {
918+
return '' === $r ? ' ' : $r;
919+
},
920+
$row
921+
);
922+
$row = implode( ',', $row );
915923
// don't use fpucsv here because we need to just dump the data
916924
// minus the empty rows
917925
// because fputcsv needs to tokenize

0 commit comments

Comments
 (0)