Skip to content

Commit bb64578

Browse files
APCT-1194
fixing some bugs
1 parent 84226c4 commit bb64578

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

app/code/Magento/Eav/Model/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@ public function _resetState(): void
990990
{
991991
$this->attributesPerSet = [];
992992
$this->_attributeData = [];
993-
foreach ($this->attributes as $attributesGroupedByEntityTypeCode) {
994-
foreach ($attributesGroupedByEntityTypeCode as $attribute) {
993+
foreach ($this->attributes ?? [] as $attributesGroupedByEntityTypeCode) {
994+
foreach ($attributesGroupedByEntityTypeCode ?? [] as $attribute) {
995995
if ($attribute instanceof ResetAfterRequestInterface) {
996996
$attribute->_resetState();
997997
}

lib/internal/Magento/Framework/GraphQl/Query/QueryComplexityLimiter.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use GraphQL\Validator\Rules\QueryDepth;
1818
use GraphQL\Validator\Rules\QueryComplexity;
1919
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
20-
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
2120

2221
/**
2322
* QueryComplexityLimiter
@@ -28,7 +27,7 @@
2827
*
2928
* https://github.com/webonyx/graphql-php/blob/master/docs/security.md#query-complexity-analysis
3029
*/
31-
class QueryComplexityLimiter implements ResetAfterRequestInterface
30+
class QueryComplexityLimiter
3231
{
3332
/**
3433
* @var int
@@ -128,16 +127,4 @@ public function validateFieldCount(string $query): void
128127
}
129128
}
130129
}
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-
}
143130
}

0 commit comments

Comments
 (0)