aboutsummaryrefslogtreecommitdiff
path: root/pmwiki.php
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-04-29 18:04:50 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-04-29 18:04:50 +0000
commit4ce357e94766665d931e9cef376d7a704642587b (patch)
tree0a8aab76860e99f5519cde506d33b848e65b8d0a /pmwiki.php
parentb35fd634e4708e9ad74ac81531cc004ea18fe6ea (diff)
downloadpmwiki.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.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/pmwiki.php b/pmwiki.php
index 234f28ac..231aacf2 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -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