Skip to content

Commit

Permalink
DebugController now opens files read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ElGigi committed Oct 4, 2024
1 parent 1093ffe commit cbb7837
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This projec
to [Semantic Versioning] (http://semver.org/). For change log format,
use [Keep a Changelog] (http://keepachangelog.com/).

## [2.2.7] - 2024-10-04

### Fixed

- `DebugController` now opens files read-only

## [2.2.6] - 2024-08-29

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/DebugController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function distFiles(
}

$extension = substr($fileName, strrpos($fileName, '.') + 1);
$stream = new Stream\FileStream($fileName);
$stream = new Stream\FileStream($fileName, 'r');

// Headers
$headers = [
Expand Down Expand Up @@ -183,7 +183,7 @@ public function distCaller(): ResponseInterface
throw new InternalServerErrorHttpException('Toolbar caller not found');
}

$body = new Stream\FileStream($fileName);
$body = new Stream\FileStream($fileName, 'r');

return $this->response(
$body,
Expand Down

0 comments on commit cbb7837

Please sign in to comment.