You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have entered a value in a field and saved it to the database, you can not save a null value back to that field.
steps to reproduce
create a row in a databse
go back and edit it and try to put no value (delete all text) and click save
expected - when you view the row, the field is empty actual - the old value is still in the field
fix - in cleanseValuesAgainstSchema() we're checking if a field is defined like this:
if (isset($values[$key])) {
If $values[$key] == null then this isset will be false. we actually just want to see if it's defined, not if it's null. so let's switch that line to this:
if (array_key_exists($key, $values)) {
and we'll be all bettah!
The text was updated successfully, but these errors were encountered:
If you have entered a value in a field and saved it to the database, you can not save a
null
value back to that field.steps to reproduce
expected - when you view the row, the field is empty
actual - the old value is still in the field
fix - in
cleanseValuesAgainstSchema()
we're checking if a field is defined like this:If
$values[$key] == null
then this isset will be false. we actually just want to see if it's defined, not if it'snull
. so let's switch that line to this:and we'll be all bettah!
The text was updated successfully, but these errors were encountered: