From 335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 20 Feb 2017 18:12:46 +0100 Subject: PHP 7 compatibility from Sourceforge #680 --- functions/parse/recur_functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions/parse/recur_functions.php') diff --git a/functions/parse/recur_functions.php b/functions/parse/recur_functions.php index 82e9568..8bce9fe 100644 --- a/functions/parse/recur_functions.php +++ b/functions/parse/recur_functions.php @@ -138,7 +138,7 @@ function expand_byday($time) { [2] => 4 number [3] => TH day abbr */ - ereg ('([-\+]{0,1})?([0-9]+)?([A-Z]{2})', $day, $byday_arr); + preg_match ('/([-\+]{0,1})?([0-9]+)?([A-Z]{2})/', $day, $byday_arr); $on_day = two2threeCharDays($byday_arr[3]); switch ($freq_type) { case 'week': @@ -254,7 +254,7 @@ function restrict_byday($times, $freq = '') { [2] => 4 number [3] => TH day abbr */ - ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); + preg_match ('/([-\+]{0,1})?([0-9]{1})?([A-Z]{2})/', $day, $byday_arr); $byday3[] = two2threeCharDays($byday_arr[3]); } $new_times = array(); -- cgit v1.2.3