aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/FetchableModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Model/FetchableModel.php')
-rw-r--r--Digitigrade/Model/FetchableModel.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Digitigrade/Model/FetchableModel.php b/Digitigrade/Model/FetchableModel.php
index e14cc2e..6d21f40 100644
--- a/Digitigrade/Model/FetchableModel.php
+++ b/Digitigrade/Model/FetchableModel.php
@@ -38,7 +38,7 @@ abstract class FetchableModel extends Model implements RemoteFetchable {
if (!($reflType instanceof \ReflectionNamedType))
continue;
$type = $reflType->getName();
- if (is_subclass_of($type, FetchableModel::class) && is_string($data->{$propName})) {
+ if (is_subclass_of($type, FetchableModel::class) && isset($data->{$propName}) && is_string($data->{$propName})) {
// try to avoid recursion
// TODO: make a better effort at avoiding recursion (e.g. when it's more than one step nested)
if ($data->{$propName} == $uri) {