Moved the bcmath wrapper method to the helper class for all over use

This commit is contained in:
2018-08-30 23:22:48 +02:00
parent b3c4414320
commit f3539185ab
7 changed files with 111 additions and 49 deletions

View File

@ -523,7 +523,7 @@ class Compiler extends Infusion
$lineBites[$lineNumber] = (int) mb_strlen($lineContent, '8bit');
if (!$found)
{
$bites = (int) $this->bcmath('add', $lineBites[$lineNumber], $bites);
$bites = (int) ComponentbuilderHelper::bcmath('add', $lineBites[$lineNumber], $bites);
}
if ($found && !$foundEnd)
{
@ -659,12 +659,12 @@ class Compiler extends Infusion
// Add the data
fwrite($fpFile, $data);
// truncate file at the end of the data that was added
$remove = $this->bcmath('add', $position, mb_strlen($data, '8bit'));
$remove = ComponentbuilderHelper::bcmath('add', $position, mb_strlen($data, '8bit'));
ftruncate($fpFile, $remove);
// check if this was a replacement of data
if ($replace)
{
$position = $this->bcmath('add', $position, $replace);
$position = ComponentbuilderHelper::bcmath('add', $position, $replace);
}
// move to the position of the data that should remain below the new data
fseek($fpTemp, $position);