Argument #1 ($link) must be of type Drupal\linkchecker\LinkCheckerLinkInterface, null given

Created on 26 September 2023, about 1 year ago
Updated 19 April 2024, 5 months ago

Problem/Motivation

During the execution of the queue linkchecker_status_handle we get the error message "TypeError: Drupal\linkchecker\Plugin\LinkStatusHandlerBase::handle(): Argument #1 ($link) must be of type Drupal\linkchecker\LinkCheckerLinkInterface, null given". This blocks the cron process.

Steps to reproduce

Have a queue item for the "linkchecker_status_handle" queue with an id that doesn't exist anymore in the linkchecker_link table.

Proposed resolution

Change the catch on line 79 from catching the Exception to catching the Throwable.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium cgoffin

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