Skip to content

Commit

Permalink
Dev: fixed error message shown inside exported SPSS syntax file, only…
Browse files Browse the repository at this point in the history
… in debug mode
  • Loading branch information
dominikvitt committed Jan 31, 2019
1 parent dfcfe9f commit 7937529
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/controllers/admin/export.php
Expand Up @@ -503,7 +503,9 @@ public function exportspss()
foreach ($label_parts as $idx => $label_part) {
if ($idx != count($label_parts) && substr($label_part, -1) == '"' && substr($label_part, -2) != '"') {
$label_parts[$idx] = rtrim($label_part, '"');
$label_parts[$idx + 1] = '"'.$label_parts[$idx + 1];
if (array_key_exists($idx + 1, $label_parts)){
$label_parts[$idx + 1] = '"'.$label_parts[$idx + 1];
}
}
}
echo "VARIABLE LABELS ".$field['id']." \"".implode("\"+\n\"", $label_parts)."\".\n";
Expand Down

0 comments on commit 7937529

Please sign in to comment.