Skip to content

Commit

Permalink
Change copied to hotfix for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Oct 13, 2015
2 parents 6b2c402 + 4ef3401 commit 679cb72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/data_cleaner/controllers/verification_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ private function internal_upload_rule_file($totaldone, $cacheArr) {
throw new exception("Could not open file $filepath");
}
$filecontent = fread($resource,1000000);
// if no BOM, not unicode, so convert for safety. See Warehouse issue 22.
if (strpos($filecontent, "\xEF\xBB\xBF")!==0)
$filecontent = utf8_encode($filecontent);
$settings = data_cleaner::parse_test_file($filecontent);
$this->read_rule_content($settings, $cacheArr['files'][$totaldone]['path'], $cacheArr['files'][$totaldone]['source_url']);
return $cacheArr['files'][$totaldone]['display'];
Expand Down

0 comments on commit 679cb72

Please sign in to comment.