Skip to content

Commit bad5cba

Browse files
Steveb-pnick-zh
authored andcommitted
Cast LOG_DEBUG to string in sample (#340)
All configuration parameters passed to librdkafka should be strings. Failure to do so results in: ``` TypeError : RdKafka\Conf::set() expects parameter 2 to be string, integer given ```
1 parent b2175c9 commit bad5cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ servers) to it:
5050
``` php
5151
<?php
5252
$conf = new RdKafka\Conf();
53-
$conf->set('log_level', LOG_DEBUG);
53+
$conf->set('log_level', (string) LOG_DEBUG);
5454
$conf->set('debug', 'all');
5555
$rk = new RdKafka\Producer($conf);
5656
$rk->addBrokers("10.0.0.1:9092,10.0.0.2:9092");

0 commit comments

Comments
 (0)