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 --- lib/HTTP/WebDAV/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/HTTP/WebDAV/Server.php') 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, '$', $condition)) { + if (!preg_match('/^$/', $condition)) { return; } } -- cgit v1.2.3