diff options
Diffstat (limited to 'app/class/table.class.php')
-rw-r--r-- | app/class/table.class.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/class/table.class.php b/app/class/table.class.php index 45be8c5..c547e43 100644 --- a/app/class/table.class.php +++ b/app/class/table.class.php @@ -68,6 +68,15 @@ abstract class table } /* + * This function uses loadObj to re-initialize this object, if in + * the case it gets modified in another scope. + */ + public function refreshObj() : void + { + $this->loadObj($this->guid); + } + + /* * This function will update this object in the database, or insert new * data if this object does not yet have a GUID. This function uses the * $fields array to construct SQL queries. @@ -118,7 +127,10 @@ abstract class table foreach ($flds as $fld) { if (!isset($this->$fld)) + { + $this->$fld = ""; continue; + } $fld = database::esc($fld); $fldstr .= $fld . ", "; |