Skip to content

Commit 3411376

Browse files
committed
Fixed issue #95 (Compatibility with PHP 7.1)
1 parent a44a737 commit 3411376

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

msgpack_convert.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,11 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */
289289
zend_fcall_info_cache fcc;
290290

291291
fci.size = sizeof(fci);
292+
#if PHP_VERSION_ID < 70100
292293
fci.function_table = EG(function_table);
293-
fci.function_name = function_name;
294294
fci.symbol_table = NULL;
295+
#endif
296+
fci.function_name = function_name;
295297
fci.object = Z_OBJ_P(return_value);
296298
fci.retval = &retval;
297299
fci.param_count = 0;
@@ -300,7 +302,12 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */
300302

301303
fcc.initialized = 1;
302304
fcc.function_handler = ce->constructor;
305+
306+
#if PHP_VERSION_ID < 70100
303307
fcc.calling_scope = EG(scope);
308+
#else
309+
fcc.calling_scope = zend_get_executed_scope();
310+
#endif
304311
fcc.called_scope = Z_OBJCE_P(return_value);
305312
fcc.object = Z_OBJ_P(return_value);
306313

0 commit comments

Comments
 (0)