Skip to content

Commit 1f8931a

Browse files
committed
Update DataSheet.php
1 parent 2fb33c3 commit 1f8931a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DataSheet.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ public function addRows( $dataSet ) {
5353
* @param array $row
5454
*/
5555
public function addRow( array $row ) {
56-
foreach( $row as $col ) {
57-
if( !is_scalar($col) ) {
56+
foreach( $row as &$col ) {
57+
if( !is_scalar($col) && !is_null($col) ) {
5858
throw new InvalidDataTypeException;
5959
}
60+
61+
$col = (string)$col;
6062
}
6163

6264
fwrite($this->tmpStream, json_encode($row) . "\n");

0 commit comments

Comments
 (0)