diff --git a/lib/Model.php b/lib/Model.php index 145d2e2c..fe26174a 100644 --- a/lib/Model.php +++ b/lib/Model.php @@ -511,7 +511,7 @@ public function remove ($id = false) { public static function get ($id) { $class = get_called_class (); $q = new $class; - $res = (array) DB::single ('select * from `' . $q->table . '` where `' . $q->key . '` = ?', $id); + $res = DB::single ('select * from `' . $q->table . '` where `' . $q->key . '` = ?', $id); if (! $res) { $q->error = (DB::$error != false) ? DB::error () : 'No object by that ID.'; $q->data = array ();