Skip to content

Commit 7da1dd8

Browse files
authored
Merge pull request #809 from Codeinwp/bugfix/808
Fix last column dissapear issue when delete header column
2 parents 03ceaf9 + 4cba663 commit 7da1dd8

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
@@ -918,6 +918,14 @@ private function handleCSVasString( $data, $editor_type ) {
918918
if ( empty( $row ) ) {
919919
continue;
920920
}
921+
$row = explode( ',', $row );
922+
$row = array_map(
923+
function( $r ) {
924+
return '' === $r ? ' ' : $r;
925+
},
926+
$row
927+
);
928+
$row = implode( ',', $row );
921929
// don't use fpucsv here because we need to just dump the data
922930
// minus the empty rows
923931
// because fputcsv needs to tokenize

0 commit comments

Comments
 (0)