Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fix issue when http headers are already present ([#843](https://github.com/jsonrainbow/json-schema/pull/843))

## [6.5.1] - 2025-08-29
### Changed
Expand Down
4 changes: 4 additions & 0 deletions src/JsonSchema/Uri/Retrievers/FileGetContents.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class FileGetContents extends AbstractRetriever
*/
public function retrieve($uri)
{
if (function_exists('http_clear_last_response_headers')) {
http_clear_last_response_headers();
}

$errorMessage = null;
set_error_handler(function ($errno, $errstr) use (&$errorMessage) {
$errorMessage = $errstr;
Expand Down