Skip to content

Commit 8a32f54

Browse files
Merge branch '3.4' into 4.2
* 3.4: (24 commits) Apply php-cs-fixer rule for array_key_exists() [Security] Change FormAuthenticator if condition handles multi-byte characters in autocomplete speed up tests running them without debug flag [Translations] added missing Croatian validators Fix getItems() performance issue with RedisCluster (php-redis) [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning IntegerType: reject submitted non-integer numbers be keen to newcomers [HttpKernel] Fix possible infinite loop of exceptions fixed CS [Validator] Added missing translations for Afrikaans do not validate non-submitted form fields in PATCH requests Update usage example in ArrayInput doc block. [Console] Prevent ArgvInput::getFirstArgument() from returning an option value [Validator] Fixed duplicate UUID fixed CS [EventDispatcher] Fix unknown priority Avoid mutating the Finder when building the iterator [Validator] Add the missing translations for the Greek (el) locale ...
2 parents 615be30 + 2ee045a commit 8a32f54

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Authentication/Token/AbstractToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function setAttributes(array $attributes)
178178
*/
179179
public function hasAttribute($name)
180180
{
181-
return array_key_exists($name, $this->attributes);
181+
return \array_key_exists($name, $this->attributes);
182182
}
183183

184184
/**
@@ -192,7 +192,7 @@ public function hasAttribute($name)
192192
*/
193193
public function getAttribute($name)
194194
{
195-
if (!array_key_exists($name, $this->attributes)) {
195+
if (!\array_key_exists($name, $this->attributes)) {
196196
throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name));
197197
}
198198

Authorization/AccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
4242
public function __construct(iterable $voters = [], string $strategy = self::STRATEGY_AFFIRMATIVE, bool $allowIfAllAbstainDecisions = false, bool $allowIfEqualGrantedDeniedDecisions = true)
4343
{
4444
$strategyMethod = 'decide'.ucfirst($strategy);
45-
if (!\is_callable([$this, $strategyMethod])) {
45+
if ('' === $strategy || !\is_callable([$this, $strategyMethod])) {
4646
throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy));
4747
}
4848

Encoder/EncoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getEncoder($user)
3333
$encoderKey = null;
3434

3535
if ($user instanceof EncoderAwareInterface && (null !== $encoderName = $user->getEncoderName())) {
36-
if (!array_key_exists($encoderName, $this->encoders)) {
36+
if (!\array_key_exists($encoderName, $this->encoders)) {
3737
throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName));
3838
}
3939

0 commit comments

Comments
 (0)