Parsing issue when calculating references

Created on 16 May 2024, 11 months ago
Updated 30 May 2024, 10 months ago

Problem/Motivation

From the logs:

│ TypeError: Drupal\api\Entity\DocBlock\DocReference::makeBareMemberList(): Argument #1 ($docBlock) must be of type Drupal\api\Interfaces\DocBlockInterface, null given, called in /app/web/modules/contrib/api/src/Entit │
│ #1 /app/web/modules/contrib/api/src/Entity/DocBlock/DocReference.php(676): Drupal\api\Entity\DocBlock\DocReference::calculateClassMembers()                                                                             │
│ #2 /app/web/modules/contrib/api/src/Plugin/QueueWorker/ParseQueueWorker.php(66): Drupal\api\Entity\DocBlock\DocReference::updateClassReferenceInfo()                                                                    │
│ #3 /app/vendor/drush/drush/src/Commands/core/QueueCommands.php(104): Drupal\api\Plugin\QueueWorker\ParseQueueWorker->processItem()

This situation is very unlikely to happen, but it obviously did, so make sure it doesn't error so the parsing can continue.

Proposed resolution

if (!$docBlock) {
      return $members;
}
🐛 Bug report
Status

Fixed

Version

2.0

Component

Parser

Created by

🇪🇸Spain fjgarlin

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