Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ static int curl_prereqfunction(void *clientp, char *conn_primary_ip, char *conn_
zend_value_error("The CURLOPT_PREREQFUNCTION callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT");
}
} else {
zval_ptr_dtor(&retval);
zend_type_error("The CURLOPT_PREREQFUNCTION callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT");
}
}
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/tests/curl_setopt_CURLOPT_PREREQFUNCTION.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ try {

echo "\nTesting with invalid type\n";
curl_setopt($ch, CURLOPT_PREREQFUNCTION, function() use ($port) {
return 'this should be an integer';
return ['this should be an integer' => random_bytes(64)];
});
try {
curl_exec($ch);
Expand Down
Loading