Problem/Motivation

The tombstones_node_view function has the following code:

    $build['#attached']['http_header'][] = ['Status', '410 Gone'];

This causes the following error:

TypeError: Symfony\Component\HttpFoundation\Response::setStatusCode(): Argument #1 ($code) must be of type int, string given, called in /var/www/html/web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php on line 386 in Symfony\Component\HttpFoundation\Response->setStatusCode() (line 498 of /var/www/html/vendor/symfony/http-foundation/Response.php).

The response code should be just '410', not '410 Gone'.

Steps to reproduce

Open the Tombstone node page, and observe the behavior.
This is likely a change in Symfony Foundation that's enforcing the type check.

Proposed resolution

Replace the '410 Gone' with just 410.

Remaining tasks

Apply the fix.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork tombstones-3535756

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

abramm created an issue. See original summary.

abramm’s picture

Status: Active » Needs review

Created the MR.