Skip to content

Commit b60a7d4

Browse files
authored
Fix options checks (#2)
1 parent f6e94ac commit b60a7d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FormatFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function create(string $class, array $config = []): Format
2222
throw new InvalidArgumentException('Materialize AVRO format "connection" config required');
2323
}
2424

25-
if (isset($config['options']) || !is_array($config['options'])) {
25+
if (isset($config['options']) && !is_array($config['options'])) {
2626
throw new InvalidArgumentException('Materialize AVRO format "options" config must be array');
2727
}
2828

@@ -49,7 +49,7 @@ public static function create(string $class, array $config = []): Format
4949
throw new InvalidArgumentException('Materialize Protobuf format "connection" config required');
5050
}
5151

52-
if (isset($config['options']) || !is_array($config['options'])) {
52+
if (isset($config['options']) && !is_array($config['options'])) {
5353
throw new InvalidArgumentException('Materialize Protobuf format "options" config must be array');
5454
}
5555

0 commit comments

Comments
 (0)