[pecl-networking-ssh2] master: PHP 8.6 compatibility: Replace zval_is_true
| From: | rainerjung via Casper Langemeijer | Date: | Wed, 14 Oct 2026 19:43:37 +0000 |
| Subject: | [pecl-networking-ssh2] master: PHP 8.6 compatibility: Replace zval_is_true | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-28694@lists.php.net to get a copy of this message | ||
Author: rainerjung (rainerjung)
Committer: Casper Langemeijer (langemeijer)
Date: 2026-10-14T21:43:34+02:00
Commit: https://github.com/php/pecl-networking-ssh2/commit/87f21f75fa5c61f7fae7ad3b948591ea8b24bad5
Raw diff: https://github.com/php/pecl-networking-ssh2/commit/87f21f75fa5c61f7fae7ad3b948591ea8b24bad5.diff
PHP 8.6 compatibility: Replace zval_is_true
It is defined for PHP 8.0-8.5 in Zend/zend_operators.h as
#define zval_is_true(op) \
zend_is_true(op)
The original commit adding it to php-src was 27dc598, the commit finally removing it and replacing
every use of it by zend_is_true() was commit 985d681.
Changed paths:
M ssh2.c
Diff:
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);