Skip to content

Commit 3abdf5f

Browse files
committed
More review fixes
1 parent 7acb90c commit 3abdf5f

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
@@ -802,14 +802,14 @@ static int curl_ssh_hostkeyfunction(void *clientp, int keytype, const char *key,
802802
} else if (!Z_ISUNDEF(retval)) {
803803
_php_curl_verify_handlers(ch, /* reporterror */ true);
804804
if (Z_TYPE(retval) == IS_LONG) {
805-
zend_long retval_long = zval_get_long(&retval);
805+
zend_long retval_long = Z_LVAL(retval);
806806
if (retval_long == CURLKHMATCH_OK || retval_long == CURLKHMATCH_MISMATCH) {
807807
rval = retval_long;
808808
} else {
809809
zend_throw_error(NULL, "The CURLOPT_SSH_HOSTKEYFUNCTION callback must return either CURLKHMATCH_OK or CURLKHMATCH_MISMATCH");
810810
}
811811
} else {
812-
zend_type_error("The CURLOPT_SSH_HOSTKEYFUNCTION callback must return an integer");
812+
zend_type_error("The CURLOPT_SSH_HOSTKEYFUNCTION callback must return either CURLKHMATCH_OK or CURLKHMATCH_MISMATCH");
813813
}
814814
}
815815
zval_ptr_dtor(&argv[0]);

0 commit comments

Comments
 (0)