aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
parent7a4da3f67cb891cd5408bb4b511a54ccf9662485 (diff)
downloadphpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.gz
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.bz2
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.zip
PHP 7 compatibility from Sourceforge #680
Diffstat (limited to 'lib')
-rw-r--r--lib/HTTP/WebDAV/Server.php4
-rw-r--r--lib/bennu/iCalendar_rfc2445.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/HTTP/WebDAV/Server.php b/lib/HTTP/WebDAV/Server.php
index 2d5785d..489d313 100644
--- a/lib/HTTP/WebDAV/Server.php
+++ b/lib/HTTP/WebDAV/Server.php
@@ -920,7 +920,7 @@ class HTTP_WebDAV_Server
if (isset($_SERVER['HTTP_RANGE'])) {
// we only support standard 'bytes' range specifications for now
- if (ereg('bytes[[:space:]]*=[[:space:]]*(.+)', $_SERVER['HTTP_RANGE'], $matches)) {
+ if (preg_match('@bytes[[:space:]]*=[[:space:]]*(.+)@', $_SERVER['HTTP_RANGE'], $matches)) {
$options['ranges'] = array();
// ranges are comma separated
@@ -2180,7 +2180,7 @@ class HTTP_WebDAV_Server
// but if opaquelocktokens are used (RFC2518 6.4)
// we have to check the format (litmus tests this)
if (!strncmp($condition, '<opaquelocktoken:', strlen('<opaquelocktoken'))) {
- if (!ereg('^<opaquelocktoken:[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}>$', $condition)) {
+ if (!preg_match('/^<opaquelocktoken:[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}>$/', $condition)) {
return;
}
}
diff --git a/lib/bennu/iCalendar_rfc2445.php b/lib/bennu/iCalendar_rfc2445.php
index e73d863..d6d3ace 100644
--- a/lib/bennu/iCalendar_rfc2445.php
+++ b/lib/bennu/iCalendar_rfc2445.php
@@ -124,13 +124,13 @@ function rfc2445_is_valid_value($value, $type) {
}
if($scheme === 'mailto') {
- $regexp = '^[a-zA-Z0-9]+[_a-zA-Z0-9\-]*(\.[_a-z0-9\-]+)*@(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})$';
+ $regexp = '#^[a-zA-Z0-9]+[_a-zA-Z0-9\-]*(\.[_a-z0-9\-]+)*@(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})$#';
}
else {
- $regexp = '^//(.+(:.*)?@)?(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})(:[0-9]{1,5})?(/.*)?$';
+ $regexp = '#^//(.+(:.*)?@)?(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})(:[0-9]{1,5})?(/.*)?$#';
}
- return ereg($regexp, $remain);
+ return preg_match($regexp, $remain);
break;
case RFC2445_TYPE_BINARY:

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