Skip to content

Commit 580a447

Browse files
committed
Merge branch 'master' of github.com:mevdschee/php-crud-api
2 parents 96ede40 + 39defcf commit 580a447

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3882,7 +3882,7 @@ public static function fromReflection(GenericReflection $reflection, string $nam
38823882
public static function fromJson(/* object */$json): ReflectedTable
38833883
{
38843884
$name = $json->name;
3885-
$type = $json->type;
3885+
$type = isset($json->type) ? $json->type : 'table';
38863886
$columns = [];
38873887
if (isset($json->columns) && is_array($json->columns)) {
38883888
foreach ($json->columns as $column) {

src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function fromReflection(GenericReflection $reflection, string $nam
6868
public static function fromJson(/* object */$json): ReflectedTable
6969
{
7070
$name = $json->name;
71-
$type = $json->type;
71+
$type = isset($json->type) ? $json->type : 'table';
7272
$columns = [];
7373
if (isset($json->columns) && is_array($json->columns)) {
7474
foreach ($json->columns as $column) {

0 commit comments

Comments
 (0)