From 1a609c5129243e4f653fe1f7bc1c556e04c463fe Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Fri, 18 Jul 2014 15:36:36 +0200 Subject: [PATCH] Some minor bug fixes --- src/Vdev.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Vdev.php b/src/Vdev.php index bdaab9c..2c5f999 100644 --- a/src/Vdev.php +++ b/src/Vdev.php @@ -45,7 +45,7 @@ class OMVModuleZFSVdev { * @throws OMVModuleZFSException */ - public function __construct($pool, OMVModuleZFSVdevType $type, array $disks) { + public function __construct($pool, $type, array $disks) { switch ($type) { case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN: break; @@ -65,6 +65,8 @@ class OMVModuleZFSVdev { if (count($disks) < 5) throw new OMVModuleZFSException("A Raidz3 must contain at least 5 disks"); break; + default: + throw new OMVModuleZFSException("$type: Unknown zpool type"); } $this->pool = $pool; $this->disks = $disks; -- 2.39.2