Skip to content

Commit

Permalink
Merge pull request #34 from imlcl/master
Browse files Browse the repository at this point in the history
[!] support empty numeric value
  • Loading branch information
tiamo committed Jun 16, 2019
2 parents 1b6ec69 + c4891c3 commit b331302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sav/Record/Data.php
Expand Up @@ -239,7 +239,7 @@ public function write(Buffer $buffer)
if (! $compressed) {
$buffer->writeDouble($value);
} else {
if ($value == $sysmis) {
if ($value == $sysmis || $value == "") {
$this->writeOpcode($buffer, $dataBuffer, self::OPCODE_SYSMISS);
} elseif ($value >= 1 - $bias && $value <= 251 - $bias && $value == (int) $value) {
$this->writeOpcode($buffer, $dataBuffer, $value + $bias);
Expand Down Expand Up @@ -312,4 +312,4 @@ public function toArray()
{
return $this->matrix;
}
}
}

0 comments on commit b331302

Please sign in to comment.