File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,9 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
421
421
BASIC_RINIT_SUBMODULE (dir )
422
422
BASIC_RINIT_SUBMODULE (url_scanner_ex )
423
423
424
+ /* Initialize memory for last http headers */
425
+ ZVAL_UNDEF (& BG (last_http_headers ));
426
+
424
427
/* Setup default context */
425
428
FG (default_context ) = NULL ;
426
429
@@ -485,6 +488,9 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
485
488
BASIC_RSHUTDOWN_SUBMODULE (user_filters )
486
489
BASIC_RSHUTDOWN_SUBMODULE (browscap )
487
490
491
+ /* Free last http headers */
492
+ zval_ptr_dtor (& BG (last_http_headers ));
493
+
488
494
BG (page_uid ) = -1 ;
489
495
BG (page_gid ) = -1 ;
490
496
return SUCCESS ;
Original file line number Diff line number Diff line change @@ -242,6 +242,6 @@ PHP_FUNCTION(http_last_response_header)
242
242
zend_parse_parameters_none ();
243
243
244
244
if (!Z_ISUNDEF (BG (last_http_headers ))) {
245
- ZVAL_DUP (return_value , & BG (last_http_headers ));
245
+ ZVAL_COPY (return_value , & BG (last_http_headers ));
246
246
}
247
247
}
You can’t perform that action at this time.
0 commit comments