diff --git a/bootstrap.php b/bootstrap.php index 8b7ea7eb9e20e2e4e74ee554242ac110afc861ee..f306bb4550b241aa6aaca9dbbd4a71fb18918fd3 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -295,6 +295,12 @@ class Bootstrap { if (extension_loaded('iconv')) iconv_set_encoding('internal_encoding', 'UTF-8'); + if (intval(phpversion()) < 7) { + function random_int($a, $b) { + return rand($a, $b); + } + } + function mb_str_wc($str) { return count(preg_split('~[^\p{L}\p{N}\'].+~u', trim($str))); }