From 7681ec78ca6337980788dab3bf4eedef62a6a9c5 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 17 Jan 2021 11:21:23 +1030 Subject: [PATCH] Fix bug --- src/Handler/Concerns/IncludesData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Concerns/IncludesData.php b/src/Handler/Concerns/IncludesData.php index 00f73d0..0375dd1 100644 --- a/src/Handler/Concerns/IncludesData.php +++ b/src/Handler/Concerns/IncludesData.php @@ -72,7 +72,7 @@ trait IncludesData throw new BadRequestException("Invalid include [{$path}{$name}]", 'include'); } - if ($type = $fields[$name]->getType()) { + if (($type = $fields[$name]->getType()) && is_string($type)) { $relatedResource = $this->api->getResource($type); $this->validateInclude($relatedResource, $nested, $name.'.');