ArgumentCountError when visiting `/nagios` on D11

Created on 7 October 2024, about 2 months ago

Problem/Motivation

When the `/nagios` page is accessed in D11, a WSOD occurs:

```
ArgumentCountError: Too few arguments to function Symfony\Component\HttpFoundation\Response::setExpires(), 0 passed in /mysiteweb/modules/contrib/nagios/src/Controller/StatuspageController.php on line 80 and exactly 1 expected in Symfony\Component\HttpFoundation\Response->setExpires() (line 734 of /mysite/web/vendor/symfony/http-foundation/Response.php).
```

Proposed resolution

The Symfony "Response" component has had a function signature change on the `setExpires()` method.

Old:

public function setExpires(\DateTimeInterface $date = null): static

Current:

public function setExpires(?\DateTimeInterface $date): static

This means we must explicitly pass `NULL` where previously we passed nothing.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States MegaphoneJon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024