Skip to content

Commit 86287ad

Browse files
committed
Properly check ZPP
1 parent 48ea03f commit 86287ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/standard/http.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ PHP_FUNCTION(request_parse_body)
364364

365365
PHP_FUNCTION(http_get_last_response_headers)
366366
{
367-
zend_parse_parameters_none();
367+
if (zend_parse_parameters_none() == FAILURE) {
368+
RETURN_THROWS();
369+
}
368370

369371
if (!Z_ISUNDEF(BG(last_http_headers))) {
370372
RETURN_COPY_VALUE(return_value, &BG(last_http_headers));
@@ -375,7 +377,9 @@ PHP_FUNCTION(http_get_last_response_headers)
375377

376378
PHP_FUNCTION(http_clear_last_response_headers)
377379
{
378-
zend_parse_parameters_none();
380+
if (zend_parse_parameters_none() == FAILURE) {
381+
RETURN_THROWS();
382+
}
379383

380384
zval_ptr_dtor(&BG(last_http_headers));
381385
ZVAL_UNDEF(&BG(last_http_headers));

0 commit comments

Comments
 (0)