diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index b0918c82f9..42b7ff0d15 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -39,6 +39,9 @@ class Local extends \OC\Files\Storage\Common { protected $datadir; public function __construct($arguments) { + if (!isset($arguments['datadir']) || !is_string($arguments['datadir'])) { + throw new \InvalidArgumentException('No data directory set for local storage'); + } $this->datadir = $arguments['datadir']; if (substr($this->datadir, -1) !== '/') { $this->datadir .= '/';