Skip to content

Commit

Permalink
Fixed issue Tab Separated Value files not importing due to "class" no…
Browse files Browse the repository at this point in the history
…t found error

Dev Byte Order Mark was not being consistently removed from start of file
  • Loading branch information
TMSWhite committed Sep 25, 2012
1 parent a3d869f commit 4eb4dbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/helpers/admin/import_helper.php
Expand Up @@ -4255,6 +4255,10 @@ function TSVImportSurvey($sFullFilepath)
}
// remove BOM from the first header cell, if needed
$rowheaders[0] = preg_replace("/^\W+/","",$rowheaders[0]);
if (preg_match('/class$/',$rowheaders[0]))
{
$rowheaders[0] = 'class'; // second attempt to remove BOM
}

$adata = array();
foreach ($filelines as $rowline)
Expand Down

0 comments on commit 4eb4dbb

Please sign in to comment.