We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dbd010c + 42bab29 commit e14a77aCopy full SHA for e14a77a
src/FieldType/User.php
@@ -39,7 +39,7 @@ public static function register_field_type(): void {
39
return null;
40
}
41
42
- $values = [];
+ $values = is_array( $value ) ? $value : [];
43
if ( ! is_array( $value ) ) {
44
$values[] = $value;
45
@@ -54,6 +54,10 @@ static function ( $user ) {
54
$values
55
);
56
57
+ if ( empty( $value ) ) {
58
+ return null;
59
+ }
60
+
61
$resolver = new UserConnectionResolver( $root, $args, $context, $info );
62
return $resolver->set_query_arg( 'include', $value )->set_query_arg( 'orderby', 'include' )->get_connection();
63
},
0 commit comments