diff --git a/ssh2.c b/ssh2.c index 0bb7ce6..fca4192 100644 --- a/ssh2.c +++ b/ssh2.c @@ -158,7 +158,7 @@ LIBSSH2_MACERROR_FUNC(php_ssh2_macerror_cb) if (FAILURE == call_user_function(NULL, NULL, data->macerror_cb, &zretval, 1, args)) { php_error_docref(NULL, E_WARNING, "Failure calling macerror callback"); } else { - retval = zval_is_true(&zretval) ? 0 : -1; + retval = zend_is_true(&zretval) ? 0 : -1; } if (Z_TYPE_P(&zretval) != IS_UNDEF) { zval_ptr_dtor(&zretval); diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c index f1b3ce1..61e41f8 100644 --- a/ssh2_fopen_wrappers.c +++ b/ssh2_fopen_wrappers.c @@ -557,7 +557,7 @@ static php_stream *php_ssh2_shell_open(LIBSSH2_SESSION *session, zend_resource * if (libssh2_channel_setenv_ex(channel, key->val, key->len, Z_STRVAL(copyval), Z_STRLEN(copyval))) { php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", ZSTR_VAL(key), Z_STRVAL(copyval)); } - zval_dtor(©val); + zval_ptr_dtor_nogc(©val); } } else { php_error_docref(NULL, E_NOTICE, "Skipping numeric index in environment array"); @@ -831,7 +831,7 @@ static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, zend_resource if (libssh2_channel_setenv_ex(channel, key->val, key->len, Z_STRVAL(copyval), Z_STRLEN(copyval))) { php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", ZSTR_VAL(key), Z_STRVAL(copyval)); } - zval_dtor(©val); + zval_ptr_dtor_nogc(©val); } } else { php_error_docref(NULL, E_NOTICE, "Skipping numeric index in environment array");