From: Alexandros Couloumbis Date: Mon, 9 Dec 2019 09:28:59 +0000 (+0200) Subject: fix php5 compatibility X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=2094f50dc03a850637a68c7cfe84b63ccc6578b7;p=lifetype%2F.git fix php5 compatibility --- diff --git a/class/data/preg_wrapper.php b/class/data/preg_wrapper.php index 3d9fbd9..ae986e4 100644 --- a/class/data/preg_wrapper.php +++ b/class/data/preg_wrapper.php @@ -35,7 +35,9 @@ function my_compile_regex($replacement) function my_preg_replace_internal($pattern, $replacement, $subject) { global $lwb_compiled_regexes; - $func = $lwb_compiled_regexes[$replacement] ?? my_compile_regex($replacement); + // make this php5 compatible + // $func = $lwb_compiled_regexes[$replacement] ?? my_compile_regex($replacement); + $func = isset($lwb_compiled_regexes[$replacement]) ? $lwb_compiled_regexes[$replacement] : my_compile_regex($replacement); return preg_replace_callback($pattern, $func, $subject); }