Skip to content

Commit

Permalink
MDI-1424 Fix error remove $this on anonymous function
Browse files Browse the repository at this point in the history
  • Loading branch information
seergiue authored and kpicaza committed Nov 26, 2021
1 parent 3a3532a commit 12cd3ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Twig-sifo-plugins/function.email_obfuscator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function twig_function_email_obfuscator()
$textafter = '';
if (!empty($linktext))
{
$temp = smarty_block_t($extra_params, $linktext, $this, null);
$calling_class = get_called_class();
$obj = new $calling_class();
$temp = smarty_block_t($extra_params, $linktext, $obj);
// If the email is inside the text string
$email_position = strpos($temp, $email);
if ($email_position)
Expand Down

0 comments on commit 12cd3ea

Please sign in to comment.