aboutsummaryrefslogtreecommitdiffstats
path: root/functions/parse/parse_tzs.php
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2017-02-20 18:12:46 +0100
committerDaniel Lange <DLange@git.local>2017-02-20 18:12:46 +0100
commit335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70 (patch)
tree6dfb123b3ff27b46bcdf9ef9acf8fa41bffec946 /functions/parse/parse_tzs.php
parent7a4da3f67cb891cd5408bb4b511a54ccf9662485 (diff)
downloadphpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.gz
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.bz2
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.zip
PHP 7 compatibility from Sourceforge #680
Diffstat (limited to 'functions/parse/parse_tzs.php')
-rw-r--r--functions/parse/parse_tzs.php6
1 files changed, 3 insertions, 3 deletions
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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy