Skip to content

PHP 7 Warning: Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead #273

Description

@nguyenphukiem

When i upgrade my php from 5.6 to 7.3 i got this problem on my code: "PHP 7 Warning: Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead". This is my code

$template = preg_replace("/<!--{temphome\s+([a-z0-9_/]+)}-->/ie", "$this->looptemphome($module,'\1')", $template);
$template = preg_replace("/<!--{tempblock\s+([a-z0-9_/]+)}-->/ie", "$this->looptempblock($module,'\1')", $template);
$template = preg_replace("/<!--{tempglobal\s+([a-z0-9_/]+)\s+([a-z0-9_/]+)}-->/ie", "$this->looptempblock('\1','\2')", $template);

	$template   = preg_replace("/\<\!\-\-\{looptemp\s+([a-z0-9_\/]+)\}\-\-\>/ie", "\$this->looptemp('\\1')", $template);

Who else can help me to fix that?
Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions