Skip to content

Commit 082d5e4

Browse files
committed
bugfix
1 parent 34c7ac9 commit 082d5e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2263,7 +2263,7 @@ protected function swagger($settings) {
22632263
$result = $this->db->query($this->db->getSql('reflect_columns'),array($table_list[0],$database));
22642264
while ($row = $this->db->fetchRow($result)) {
22652265
if ($row[1]!==null) $table_fields[$table['name']][$row[0]]->default = $row[1];
2266-
$table_fields[$table['name']][$row[0]]->required = strtolower($row[2])=='no' && $row[1]===null;
2266+
$table_fields[$table['name']][$row[0]]->required = in_array(strtolower($row[2]),array('no','1')) && $row[1]===null;
22672267
$table_fields[$table['name']][$row[0]]->{'x-dbtype'} = $row[3];
22682268
$table_fields[$table['name']][$row[0]]->maxLength = $row[4];
22692269
if ($this->db->isNumericType($table_fields[$table['name']][$row[0]])) {

0 commit comments

Comments
 (0)