diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2023-04-29 18:04:50 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2023-04-29 18:04:50 +0000 |
commit | 4ce357e94766665d931e9cef376d7a704642587b (patch) | |
tree | 0a8aab76860e99f5519cde506d33b848e65b8d0a /pmwiki.php | |
parent | b35fd634e4708e9ad74ac81531cc004ea18fe6ea (diff) | |
download | pmwiki.svn-4ce357e94766665d931e9cef376d7a704642587b.tar.bz2 |
Fix PRCB() for PHP < 7.4.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4441 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'pmwiki.php')
-rw-r--r-- | pmwiki.php | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -815,7 +815,10 @@ function PRCB($pat, $repl, $subj, $vars=null, $limit=-1, &$count=null, $flags=0) $cb = new PPRC($vars, $repl); $repl = array($cb, 'callback'); } - return preg_replace_callback($pat, $repl, $subj, $limit, $count, $flags); + + if (PHP_VERSION_ID >= 70400) + return preg_replace_callback($pat, $repl, $subj, $limit, $count, $flags); + return preg_replace_callback($pat, $repl, $subj, $limit, $count); } ## callback functions class PPRC { # PmWiki preg replace callbacks + pass local vars |