Moved the bcmath wrapper method to the helper class for all over use
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user