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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
fail-fast: false
steps:
- name: Checkout
Expand Down
7 changes: 4 additions & 3 deletions application/src/View/Strategy/ApiJsonStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ protected function getFormat(ApiJsonModel $model)
$this->formats = $args['formats'];

// Prioritize the "format" query parameter.
$format = $model->getOption('format');
if (array_key_exists($format, $this->formats)) {
return $format;
if ($format = $model->getOption('format')) {
if (array_key_exists($format, $this->formats)) {
return $format;
}
}
// Respect the Accept header for content negotiation.
$acceptHeader = $model->getOption('accept_header');
Expand Down