Skip to content

Commit

Permalink
Merge pull request #16248 from eileenmcnaughton/cc
Browse files Browse the repository at this point in the history
[NFC] Code comments
  • Loading branch information
seamuslee001 authored Jan 9, 2020
2 parents 6544429 + a03898d commit 8d5c32f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Core/Report/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ public static function makeCSVTable($header, $rows, $titleHeader = NULL, $output
else {
// loic1 : always enclose fields
//$value = ereg_replace("\015(\012)?", "\012", $value);
// Convert carriage return to line feed.
$value = preg_replace("/\015(\012)?/", "\012", $value);
if ((substr($value, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR) &&
(substr($value, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR)
) {

$strArray = explode(CRM_Core_DAO::VALUE_SEPARATOR, $value);

// Filter out empty value separated strings.
foreach ($strArray as $key => $val) {
if (trim($val) == '') {
unset($strArray[$key]);
Expand Down

0 comments on commit 8d5c32f

Please sign in to comment.