ソースを参照

maxLength should be positive, see #216 and #217

mevdschee 8年前
コミット
ea61344256
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      api.php

+ 1
- 1
api.php ファイルの表示

@@ -2432,7 +2432,7 @@ class PHP_CRUD_API {
2432 2432
 							}
2433 2433
 							echo ',"x-dbtype": '.json_encode($action['fields'][$field]->{'x-dbtype'});
2434 2434
 							echo ',"x-nullable": '.json_encode($action['fields'][$field]->{'x-nullable'});
2435
-							if (isset($action['fields'][$field]->maxLength)) {
2435
+							if (isset($action['fields'][$field]->maxLength) && $action['fields'][$field]->maxLength>0) {
2436 2436
 								echo ',"maxLength": '.json_encode($action['fields'][$field]->maxLength);
2437 2437
 							}
2438 2438
 							if (isset($action['fields'][$field]->default)) {

読み込み中…
キャンセル
保存