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/parse_tzs.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'functions/parse/parse_tzs.php') diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php index 2e10834..348fe7e 100644 --- a/functions/parse/parse_tzs.php +++ b/functions/parse/parse_tzs.php @@ -12,12 +12,12 @@ $is_std = false; while (!feof($ifile)) { $line = $nextline; $nextline = fgets($ifile, 1024); - $nextline = ereg_replace("[\r\n]", '', $nextline); + $nextline = preg_replace("/[\r\n]/", '', $nextline); #handle continuation lines that start with either a space or a tab (MS Outlook) while (isset($nextline{0}) && ($nextline{0} == ' ' || $nextline{0} == "\t")) { $line = $line . substr($nextline, 1); $nextline = fgets($ifile, 1024); - $nextline = ereg_replace("[\r\n]", '', $nextline); + $nextline = preg_replace("/[\r\n]/", '', $nextline); } $line = trim($line); switch ($line) { @@ -56,7 +56,7 @@ while (!feof($ifile)) { break; default: unset ($field, $data, $prop_pos, $property); - if (ereg ('([^:]+):(.*)', $line, $line)){ + if (preg_match ('/([^:]+):(.*)/', $line, $line)){ $field = $line[1]; $data = $line[2]; $property = strtoupper($field); -- cgit v1.2.3