Skip to content

Fix: Exception: setTopicName(): Argument #1 ($topicName) must be of type string, int given#100

Open
info2soft wants to merge 1 commit intoswoole:masterfrom
info2soft:master
Open

Fix: Exception: setTopicName(): Argument #1 ($topicName) must be of type string, int given#100
info2soft wants to merge 1 commit intoswoole:masterfrom
info2soft:master

Conversation

@info2soft
Copy link

Exception: longlang\phpkafka\Group\Struct\ConsumerGroupTopic::setTopicName(): Argument #1 ($topicName) must be of type string, int given

$partitions[$topic] = $this->getTopicPartitions($topic, $topicMetadatas);

Strings containing valid decimal ints, unless the number is preceded by a + sign, will be cast to the int type. E.g. the key "8" will actually be stored under 8. On the other hand "08" will not be cast, as it isn't a valid decimal integer.

…tTopicName(): Argument swoole#1 ($topicName) must be of type string, int given

$partitions[$topic] = $this->getTopicPartitions($topic, $topicMetadatas);

Strings containing valid decimal ints, unless the number is preceded by a + sign, will be cast to the int type. E.g. the key "8" will actually be stored under 8. On the other hand "08" will not be cast, as it isn't a valid decimal integer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant