Open Kitsap-Sun-545 opened 9 years ago
Sorry for my late reply. And, thank you very much for reporting.
I tried to verify the process that inputting data to table by the plugin. And, as you say, I also found a few bugs in the data verification part.
I will fix the bugs of data verification process. Then, I am going to try to release in the next version up.
Thank you,
Greetings, I'm using v1.10
If a field is required (since it's a not null column) and a user enters 0 for that field, an error is thrown during validation stating that the value is empty.
Steps to reproduce:
Additional background:
The problem appears to be in the
validate_data
method ofCustomDatabaseTables
class inlib/cdbt.class.php
The
empty
function returns true when $data evaluates as false. See http://php.net/manual/en/function.empty.php for more information.This means that
empty($data)
will returntrue
when$data
is a string containing the number 0. In my installation I've changed the validate function to explicitly check for empty string or null which then allows me to set 0 values on input or edit.