Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0.2
-
None
-
None
-
PHP 7.3 and 7.4
-
1
Description
I can generate a segfault when using the following code:
<?php
$o = new \Couchbase\ViewOptions();
$id = 1;
$o->raw('startkey', '[' . $id . ']');
var_dump($o);
Running the code with either php 7.3 or 7.4 yields the following output:
object(Couchbase\ViewOptions)#1 (5) {
["timeout":"Couchbase\ViewOptions":private]=>
NULL
["include_docs":"Couchbase\ViewOptions":private]=>
NULL
["max_concurrent_docs":"Couchbase\ViewOptions":private]=>
NULL
["query":"Couchbase\ViewOptions":private]=>
array(1) {
["startkey"]=>
string(4047968968097231973) "Segmentation fault (core dumped)
This doesn't happen when I give '[1]' instead of '[' . $id . ']' for some reason to the raw function.