summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/class/table.class.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/class/table.class.php b/app/class/table.class.php
index 52a3e7d..28308bb 100644
--- a/app/class/table.class.php
+++ b/app/class/table.class.php
@@ -57,7 +57,13 @@ abstract class table
{
$tbl = database::esc($tbl);
$query = "SELECT * FROM " . $tbl . " WHERE guid = '" . $guid . "'";
- $res = database::query($query)[0];
+ $res = database::query($query);
+
+ /* no results */
+ if (count($res) == 0)
+ continue;
+
+ $res = $res[0];
foreach ($flds as $fld)
{