File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
app/code/Magento/Eav/Model
lib/internal/Magento/Framework/GraphQl/Query Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -990,8 +990,8 @@ public function _resetState(): void
990
990
{
991
991
$ this ->attributesPerSet = [];
992
992
$ this ->_attributeData = [];
993
- foreach ($ this ->attributes as $ attributesGroupedByEntityTypeCode ) {
994
- foreach ($ attributesGroupedByEntityTypeCode as $ attribute ) {
993
+ foreach ($ this ->attributes ?? [] as $ attributesGroupedByEntityTypeCode ) {
994
+ foreach ($ attributesGroupedByEntityTypeCode ?? [] as $ attribute ) {
995
995
if ($ attribute instanceof ResetAfterRequestInterface) {
996
996
$ attribute ->_resetState ();
997
997
}
Original file line number Diff line number Diff line change 17
17
use GraphQL \Validator \Rules \QueryDepth ;
18
18
use GraphQL \Validator \Rules \QueryComplexity ;
19
19
use Magento \Framework \GraphQl \Exception \GraphQlInputException ;
20
- use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
21
20
22
21
/**
23
22
* QueryComplexityLimiter
28
27
*
29
28
* https://github.com/webonyx/graphql-php/blob/master/docs/security.md#query-complexity-analysis
30
29
*/
31
- class QueryComplexityLimiter implements ResetAfterRequestInterface
30
+ class QueryComplexityLimiter
32
31
{
33
32
/**
34
33
* @var int
@@ -128,16 +127,4 @@ public function validateFieldCount(string $query): void
128
127
}
129
128
}
130
129
}
131
-
132
- /**
133
- * @inheritDoc
134
- */
135
- public function _resetState (): void
136
- {
137
- foreach ($ this ->getRules () as $ rule ) {
138
- DocumentValidator::removeRule ($ rule );
139
- unset($ rule );
140
- };
141
- $ this ->rules = [];
142
- }
143
130
}
You can’t perform that action at this time.
0 commit comments