Skip to content

Commit

Permalink
fix #27
Browse files Browse the repository at this point in the history
  • Loading branch information
emalherbi committed Oct 2, 2018
1 parent 2f4f884 commit 484a610
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/MyMssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,20 @@ private function getResult($result)
$result->$key = $value->format('Y-m-d H:i:s');
}
}

if (is_int($value) && ($value <= 0)) {
if ('array' == gettype($result)) {
$result[$key] = 0;
} elseif ('object' == gettype($result)) {
$result->$key = 0;
}
} elseif (is_numeric($value) && ($value <= 0)) {
if ('array' == gettype($result)) {
$result[$key] = '0.00';
} elseif ('object' == gettype($result)) {
$result->$key = '0.00';
}
}
}
}

Expand Down

0 comments on commit 484a610

Please sign in to comment.