Skip to content

Commit

Permalink
fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
svfcode committed Dec 19, 2024
1 parent e54414f commit 021772c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cleantalk/Antispam/EmailEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ public function modifyContent($content)
$shortcode_counter = 0;
$content = preg_replace_callback($shortcode_pattern, function ($matches) use (&$shortcode_replacements, &$shortcode_counter) {
$placeholder = '%%APBCT_SHORTCODE_' . ($shortcode_counter++) . '%%';
$shortcode_replacements[$placeholder] = $matches[0];
if (isset($matches[0])) {
$shortcode_replacements[$placeholder] = $matches[0];
}
return $placeholder;
}, $content);

Expand Down

0 comments on commit 021772c

Please sign in to comment.