This commit is contained in:
Thomas Peterson 2020-12-03 14:23:43 +01:00
parent aca304880d
commit e154336cb7
3 changed files with 18 additions and 5 deletions

View File

@ -13,7 +13,7 @@
} }
}, },
"require": { "require": {
"php": ">=5.4", "php": ">=7.0",
"doctrine/orm": "^2.5" "doctrine/orm": "^2.5"
}, },
"require-dev": { "require-dev": {

View File

@ -83,8 +83,12 @@ class CalcValues
$calcValueAccount1 = 0; $calcValueAccount1 = 0;
$calcValueAccount2 = 0; $calcValueAccount2 = 0;
eval($this->engine->getParameters()); try{
eval($this->engine->getFormulas()); @eval($this->engine->getParameters());
@eval($this->engine->getFormulas());
}catch (\Throwable $e) {
}
/** @var EdgeCollection $collection */ /** @var EdgeCollection $collection */
foreach ($container as $collection) { foreach ($container as $collection) {

View File

@ -82,8 +82,12 @@ class Formel
preg_match_all('/\$P\w*\$P/', $formel, $founds); preg_match_all('/\$P\w*\$P/', $formel, $founds);
if (!empty($founds [0])) { if (!empty($founds [0])) {
eval(str_replace('\\', '', $this->engine->getParameters())); try{
@eval($this->engine->getParameters());
@eval($this->engine->getFormulas());
}catch (\Throwable $e) {
}
foreach ($founds [0] as $key => $found) { foreach ($founds [0] as $key => $found) {
$foundvalue = str_replace('$P', '', $found); $foundvalue = str_replace('$P', '', $found);
if (isset($$foundvalue)) { if (isset($$foundvalue)) {
@ -102,7 +106,12 @@ class Formel
preg_match_all('/\$F\w*\$F/', $formel, $founds); preg_match_all('/\$F\w*\$F/', $formel, $founds);
if (!empty($founds [0])) { if (!empty($founds [0])) {
eval(str_replace('\\', '', $this->engine->getFormulas())); try{
@eval($this->engine->getParameters());
@eval($this->engine->getFormulas());
}catch (\Throwable $e) {
}
foreach ($founds [0] as $key => $found) { foreach ($founds [0] as $key => $found) {
$foundvalue = str_replace('$F', '', $found); $foundvalue = str_replace('$F', '', $found);