Skip to content

Commit f6e992b

Browse files
Merge branch '4.0' into 4.1
* 4.0: [minor] SCA [Serializer] Minor tweaks for a67b650f12e5252a5d30c4c94576d73e15f19aef allow_extra_attributes does not throw an exception as documented [Cache] fix visibility of RedisTrait::init() [Serializer] Updates DocBlock to a mixed param type
2 parents d35be95 + 033a882 commit f6e992b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Loader/Configurator/DefaultsConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class DefaultsConfigurator extends AbstractServiceConfigurator
3434
*/
3535
final public function tag(string $name, array $attributes = array())
3636
{
37-
if (!is_string($name) || '' === $name) {
37+
if ('' === $name) {
3838
throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
3939
}
4040

4141
foreach ($attributes as $attribute => $value) {
42-
if (!is_scalar($value) && null !== $value) {
42+
if (null !== $value && !is_scalar($value)) {
4343
throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
4444
}
4545
}

0 commit comments

Comments
 (0)