File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff 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 ]])) {
You can’t perform that action at this time.
0 commit comments