Updated response check
This commit is contained in:
parent
26ef7a83f0
commit
c11116d764
1 changed files with 4 additions and 4 deletions
|
@ -209,11 +209,11 @@ class Response extends SwooleResponse
|
|||
}
|
||||
|
||||
foreach ($data[$key] as &$item) {
|
||||
if(!array_key_exists($rule['type'], $this->models)) {
|
||||
throw new Exception('Missing model for rule: '. $rule['type']);
|
||||
}
|
||||
|
||||
if($item instanceof Document) {
|
||||
if(!array_key_exists($rule['type'], $this->models)) {
|
||||
throw new Exception('Missing model for rule: '. $rule['type']);
|
||||
}
|
||||
|
||||
$item = $this->output($item, $rule['type']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue