I'm fixing an old script, that is thowing that warning (PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead) in this line:
'.preg_replace("|\[session id=\"(.*)\"\](.*)\[/session\]|e", "\$_SESSION['wpcc_\\1']['\\2']", stripslashes(nl2br($wpcc_cache['text']))).'
EDIT:
That is surronded by some <div>
:
<div class="wpcc_fields wpcc_text wpcc_text_'.$row->wpcc_field.'"> '.preg_replace("|\[session id=\"(.*)\"\](.*)\[/session\]|e", "\$_SESSION['wpcc_\\1']['\\2']", stripslashes(nl2br($wpcc_cache['text']))).' </div>
EDIT END
I'm reading about how preg_replace_callback works, what did the e modifier and so on, but... can I just remove the e? I don't see why this preg_replace should have a callback, it has no function as replacement, isn't it? I'm also trying to figure what is inside $wpcc_cache['text']
, but haven't found yet