From 5552353b027d635eeaf023cde869e14738cb47f7 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 22 Aug 2018 11:37:51 +0100 Subject: [PATCH] lib/php/db.php --- lib/php/db.php | 2 +- lib/php/db/table.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/php/db.php b/lib/php/db.php index cf120872..ec64dddb 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -530,7 +530,7 @@ class Db extends nb { $type = self::p('table-type',''); $type = $type ? explode(',',$type) : $type; $name = self::p('table-name',''); $name = $name ? explode(',',$name) : $name; - foreach ($this->conn->query($sql,PDO::FETCH_ASSOC) as $row) { + if ($rows = $this->conn->query($sql,PDO::FETCH_ASSOC)) foreach ($rows as $row) { $tname = current($row); # Filters diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 861e115c..07a84eae 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -2180,7 +2180,7 @@ Class Table extends nb { if (count($tables)>1) { $r .= ''; $r .= ''.html_select_array($tables,[ - 'html' => 'class="tables" name="table" id="table"', + 'html' => 'class="table" name="table" id="table"', 'selected' => $this->name, 'prettyText' => true, 'sort' => 'natcasesort', -- 2.47.3