From 50e53bb6ea45ebaa2ebf50101849a79103c7d8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dagef=C3=B6rde?= Date: Wed, 26 Apr 2017 10:44:52 +0200 Subject: [PATCH] MDL-58372 repository_webdav: Explicitly pass some filename Not passing anything triggers PHP 7.1 "Too few arguments" exception. --- repository/webdav/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repository/webdav/lib.php b/repository/webdav/lib.php index 11cb7db45d2..9f13773db96 100644 --- a/repository/webdav/lib.php +++ b/repository/webdav/lib.php @@ -72,7 +72,8 @@ class repository_webdav extends repository { } public function get_file($url, $title = '') { $url = urldecode($url); - $path = $this->prepare_file(); + // Prepare a file with an arbitrary name - cannot be $title because of special chars (cf. MDL-57002). + $path = $this->prepare_file(uniqid()); if (!$this->dav->open()) { return false; }