From: dongsheng Date: Fri, 3 Apr 2009 02:16:48 +0000 (+0000) Subject: "MDL-17475, if webdav_server is empty, return null" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7f728551de4fc060f39e1282cde3afa88f9ba23a;p=moodle.git "MDL-17475, if webdav_server is empty, return null" --- diff --git a/repository/webdav/repository.class.php b/repository/webdav/repository.class.php index ed959540fa..cbd9158ea5 100644 --- a/repository/webdav/repository.class.php +++ b/repository/webdav/repository.class.php @@ -13,6 +13,9 @@ class repository_webdav extends repository { public function __construct($repositoryid, $context = SITEID, $options = array()) { parent::__construct($repositoryid, $context, $options); $this->wd = new webdav_client(); + if (empty($this->webdav_server)) { + return; + } $this->wd->set_server($this->webdav_server); if (empty($this->webdav_port)) { $this->wd->set_port(80);