Skip to content

Commit

Permalink
Refactor for MOODLE41 & PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
luukverhoeven committed Dec 11, 2023
1 parent 26aac8e commit fbe221f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reports/evalwise.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ public function pfx($tokens, $vars = []) {
return $this->trigger("internal error");
}
$fnn = preg_replace("/^arc/", "a", $fnn); // For the 'arc' trig synonyms.
if ($fnn == 'ln') {
if ($fnn === 'ln') {
$fnn = 'log';
}

// TODO Use the PHP internal function if possible.
// @codingStandardsIgnoreStart
eval('$stack->push(' . $fnn . '($op1));'); // Perfectly safe eval().
// @codingStandardsIgnoreEnd

} else if (array_key_exists($fnn, $this->fc)) { // Calc emulation function.
// Get args.
Expand Down

0 comments on commit fbe221f

Please sign in to comment.