From 2a0aaa9d43e7a128a03b9758926500a5cdc62b00 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 11 Oct 2019 09:33:53 +0200 Subject: add patch for PHP 7.4 backported from v4 --- php-sabre-dav-php74.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 php-sabre-dav-php74.patch (limited to 'php-sabre-dav-php74.patch') diff --git a/php-sabre-dav-php74.patch b/php-sabre-dav-php74.patch new file mode 100644 index 0000000..ff8d454 --- /dev/null +++ b/php-sabre-dav-php74.patch @@ -0,0 +1,24 @@ +diff -up ../lib/DAV/Server.php.php74 ../lib/DAV/Server.php +--- ../lib/DAV/Server.php.php74 2019-10-11 09:25:27.807508723 +0200 ++++ ../lib/DAV/Server.php 2019-10-11 09:25:30.679493668 +0200 +@@ -564,7 +564,7 @@ class Server extends EventEmitter implem + */ + function calculateUri($uri) { + +- if ($uri[0] != '/' && strpos($uri, '://')) { ++ if ('' != $uri && '/' != $uri[0] && strpos($uri, '://')) { + + $uri = parse_url($uri, PHP_URL_PATH); + +diff -up ../lib/DAV/Xml/Property/Href.php.php74 ../lib/DAV/Xml/Property/Href.php +--- ../lib/DAV/Xml/Property/Href.php.php74 2019-10-11 09:23:28.870132179 +0200 ++++ ../lib/DAV/Xml/Property/Href.php 2019-10-11 09:23:45.854043154 +0200 +@@ -58,7 +58,7 @@ class Href implements Element, HtmlOutpu + */ + function getHref() { + +- return $this->hrefs[0]; ++ return (isset($this->hrefs[0]) ? $this->hrefs[0] : null); + + } + -- cgit