In Debug mode, retrieving a block field value for a block field which never had a value, I'd expect it to return null (or an empty string).
Actual behavior
Instead, it gives me Warning: undefined array key "fieldname".
Steps to reproduce
I have a query
getOrthomolCorporateProductDosageFormListing(defaultLanguage: "de_DE") {
edges {
node {
id
name(language: "de_DE")
packsizes {
size
PZN
EAN
oNumber
snapnextId
b2cAppPoints
packshot { # this is an asset field
fullpath
srcset(thumbnail: "PictureText") {
url
descriptor
}
}
}
}
}
}
}
In this model OrthomolCorporateProductDosageForm has a block packsizes. If I have one of these fields unset (never had a value) the serialized data in the db for that block is missing the array key (e.g. packshot).
If now I run pimcore in debug mode, datahub tries to access the array key nevertheless in BlockEntryType.php Line 136
So what's missing there is
if (!array_key_exists($resolveInfo->fieldName, $value)) {
return null;
}
I'd have sent a PR right a way but currently github says "no more forks can be created" for this repo?
Expected behavior
In Debug mode, retrieving a block field value for a block field which never had a value, I'd expect it to return null (or an empty string).
Actual behavior
Instead, it gives me
Warning: undefined array key "fieldname"
.Steps to reproduce
I have a query
In this model
OrthomolCorporateProductDosageForm
has a blockpacksizes
. If I have one of these fields unset (never had a value) the serialized data in the db for that block is missing the array key (e.g.packshot
).If now I run pimcore in debug mode, datahub tries to access the array key nevertheless in BlockEntryType.php Line 136
So what's missing there is
I'd have sent a PR right a way but currently github says "no more forks can be created" for this repo?