Skip to content

Commit c01ba47

Browse files
authored
Merge pull request #680 from murtukov/0.11
Fix shorthand field definitions feature
2 parents 22347fb + bd4bb23 commit c01ba47

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Definition/ConfigProcessor/AclConfigProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function acl(array $fields, AccessResolver $accessResolver, callab
2727
throw new UserWarning('Access denied to this field.');
2828
};
2929
foreach ($fields as &$field) {
30-
if (isset($field['access']) && true !== $field['access']) {
30+
if (\is_array($field) && isset($field['access']) && true !== $field['access']) {
3131
$accessChecker = $field['access'];
3232
if (false === $accessChecker) {
3333
$field['resolve'] = $deniedAccess;

src/Definition/ConfigProcessor/PublicFieldsFilterConfigProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static function filter(array $fields)
1313
function ($field, $fieldName) {
1414
$exposed = true;
1515

16-
if (isset($field['public']) && \is_callable($field['public'])) {
16+
if (\is_array($field) && isset($field['public']) && \is_callable($field['public'])) {
1717
$exposed = (bool) \call_user_func($field['public'], $fieldName);
1818
}
1919

src/Definition/ConfigProcessor/WrapArgumentConfigProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function process(LazyConfig $lazyConfig)
3434
private static function wrapFieldsArgument(array $fields)
3535
{
3636
foreach ($fields as &$field) {
37-
if (isset($field['resolve']) && \is_callable($field['resolve'])) {
37+
if (\is_array($field) && isset($field['resolve']) && \is_callable($field['resolve'])) {
3838
$field['resolve'] = Resolver::wrapArgs($field['resolve']);
3939
}
4040
}

0 commit comments

Comments
 (0)