From 73c26bafc9b869d567fbfd41149c7e3fef152c89 Mon Sep 17 00:00:00 2001 From: Jordan Parker Date: Wed, 4 Nov 2015 02:11:48 +0000 Subject: [PATCH] allow empty metadata() Fixed issue where function metadata threw and error because of it being empty if you wanted to read the root directory --- libraries/Dropbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Dropbox.php b/libraries/Dropbox.php index 3f798ea..d3e9ba2 100644 --- a/libraries/Dropbox.php +++ b/libraries/Dropbox.php @@ -236,7 +236,7 @@ public function add($dbpath, $filepath, array $params = array(), $root=self::DEF * @param string $root Either 'dropbox' or 'sandbox' * @return object response **/ - public function metadata($path, array $params = array(), $root=self::DEFAULT_ROOT) + public function metadata($path = null, array $params = array(), $root=self::DEFAULT_ROOT) { $path = str_replace('%2F', '/', rawurlencode($path)); $parstr = empty($params) ? '' : '?'.http_build_query($params);