From 453a2fc20886fa25b94017c1cccdbd05456a2d60 Mon Sep 17 00:00:00 2001
From: Malf Furious <m@lfurio.us>
Date: Fri, 14 Apr 2017 20:50:24 -0400
Subject: Fix bug in table function saveObj()

Added call to refreshObj() to the end of function saveObj() to fetch all
default values defined by the database, not set on the object in PHP.
---
 app/class/table.class.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/class/table.class.php b/app/class/table.class.php
index ac21aaf..52a3e7d 100644
--- a/app/class/table.class.php
+++ b/app/class/table.class.php
@@ -142,6 +142,8 @@ abstract class table
                     database::query($query);
                 }
             }
+
+            $this->refreshObj(); // fetch default, unset values from database
         }
     }
 
-- 
cgit v1.2.3