summaryrefslogtreecommitdiffstats
path: root/php-sabre-dav-php74.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-10-11 09:33:53 +0200
committerRemi Collet <remi@remirepo.net>2019-10-11 09:33:53 +0200
commit2a0aaa9d43e7a128a03b9758926500a5cdc62b00 (patch)
tree2a97c0f821b88ae0025280b5787a4cf8b26fab35 /php-sabre-dav-php74.patch
parentcbc33625a95842bf5980894942a3b7c49d33ec36 (diff)
add patch for PHP 7.4 backported from v4
Diffstat (limited to 'php-sabre-dav-php74.patch')
-rw-r--r--php-sabre-dav-php74.patch24
1 files changed, 24 insertions, 0 deletions
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);
+
+ }
+