Update on dataAbstract
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 13 Sep 2019 18:46:36 +0000 (14:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 25 Oct 2019 14:01:34 +0000 (10:01 -0400)
Check for no value.
Return 'null'

lib/GlmDataAbstract/DataAbstract.php

index a02de45..f29f69d 100755 (executable)
@@ -819,7 +819,8 @@ abstract class GlmDataAbstract
             if (!is_int($in)) {
                 $this->inputFieldStatus = false;
                 $this->inputErrorReason = 'Selected item not valid.';
-                return $in;
+                // return $in;
+                $in = 'null';
             }
 
         } else {
@@ -885,7 +886,7 @@ abstract class GlmDataAbstract
         }
 
         // If this is not a "new", then do these things
-        if ($op != 'n') {
+        if ($op != 'n' && $in != 'null') {
 
             // If the field validated and it's supposed to be unique
             if ($this->inputFieldStatus && isset($f['unique']) && $f['unique']) {