Skip to content

Commit

Permalink
Fix BcMathCalculator::divR()
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Jan 20, 2021
1 parent 25e372b commit dff976c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Internal/Calculator/BcMathCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function divQ(string $a, string $b) : string
*/
public function divR(string $a, string $b) : string
{
if (version_compare(PHP_VERSION, '7.2') >= 0) {
return \bcmod($a, $b, 0);
}

return \bcmod($a, $b);
}

Expand Down

0 comments on commit dff976c

Please sign in to comment.