summaryrefslogtreecommitdiffstats
path: root/app/class/table.class.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-04-13 23:23:56 -0400
committerMalf Furious <m@lfurio.us>2017-04-13 23:23:56 -0400
commite7228676ce51bf69cc974fc0bd8f8135c51fd036 (patch)
tree5b3ba05e5687100fc9a953f5e4c72ad75ff06b95 /app/class/table.class.php
parent1b0d75037fa9c0b8e8f0265da348b2238a332931 (diff)
downloadscrott-e7228676ce51bf69cc974fc0bd8f8135c51fd036.tar.gz
scrott-e7228676ce51bf69cc974fc0bd8f8135c51fd036.zip
Fix bug in table function saveObj()
While creating new objects, some default values (defined in the database schema) are missing in the PHP object definition. To address this, now while saving any *new* database objects, all undefined, expected fields are set to the empty string "".
Diffstat (limited to 'app/class/table.class.php')
-rw-r--r--app/class/table.class.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/class/table.class.php b/app/class/table.class.php
index ac21aaf..c547e43 100644
--- a/app/class/table.class.php
+++ b/app/class/table.class.php
@@ -127,7 +127,10 @@ abstract class table
foreach ($flds as $fld)
{
if (!isset($this->$fld))
+ {
+ $this->$fld = "";
continue;
+ }
$fld = database::esc($fld);
$fldstr .= $fld . ", ";