diff --git a/trunk/module/tree/model.php b/trunk/module/tree/model.php index 503bb61616..458f24a5d3 100644 --- a/trunk/module/tree/model.php +++ b/trunk/module/tree/model.php @@ -192,6 +192,7 @@ class treeModel extends model $sql = "SELECT path FROM " . TABLE_MODULE . " WHERE id = '$moduleID'"; $path = $this->dbh->query($sql)->fetchColumn(); $path = substr($path, 1, -1); + if(!$path) return array(); $sql = "SELECT * FROM " . TABLE_MODULE . " WHERE id IN($path) ORDER BY grade"; $parents = $this->dbh->query($sql)->fetchAll(); return $parents;