tarantool/tarantool-php

Unexpected behaviour when reference to array element is created

zaglex opened this issue · 1 comments

Example:

function myfunc(data)
end
$data = [
     'key1' => 'value1',
];
$link = &$data['key1'];
$tarantool->call('myfunc', [$data]);

Problem:
Inside lua-function 'myfunc' i see that data['key1'] is null (cdata<void *>: NULL).

Expected behaviour:
data['key1'] must be 'value1' in lua-function.

This bug was due to new type in PHP7 - "IS_REFERENCE". It must be fixed now on branch php7-v2. Thanks for your patience.