Skip to content

Commit 3b8df32

Browse files
committed
More review fixes
1 parent d407c9e commit 3b8df32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/curl/interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,14 +813,14 @@ static int curl_ssh_hostkeyfunction(void *clientp, int keytype, const char *key,
813813
} else if (!Z_ISUNDEF(retval)) {
814814
_php_curl_verify_handlers(ch, /* reporterror */ true);
815815
if (Z_TYPE(retval) == IS_LONG) {
816-
zend_long retval_long = zval_get_long(&retval);
816+
zend_long retval_long = Z_LVAL(retval);
817817
if (retval_long == CURLKHMATCH_OK || retval_long == CURLKHMATCH_MISMATCH) {
818818
rval = retval_long;
819819
} else {
820820
zend_throw_error(NULL, "The CURLOPT_SSH_HOSTKEYFUNCTION callback must return either CURLKHMATCH_OK or CURLKHMATCH_MISMATCH");
821821
}
822822
} else {
823-
zend_type_error("The CURLOPT_SSH_HOSTKEYFUNCTION callback must return an integer");
823+
zend_type_error("The CURLOPT_SSH_HOSTKEYFUNCTION callback must return either CURLKHMATCH_OK or CURLKHMATCH_MISMATCH");
824824
}
825825
}
826826
zval_ptr_dtor(&argv[0]);

0 commit comments

Comments
 (0)