Errors relating to $this->entity returning a boolean

Created on 29 November 2023, 7 months ago

We have a client project where harvesting fails with the following error:

> drupal_1 | 2023/11/29 18:10:28 [error] 283697#283697: *156851 FastCGI sent in stderr: "PHP message: Error: Call to a member function hasField() on bool in /var/www/drupal/web/modules/contrib/rest_oai_pmh/src/Plugin/rest/resource/OaiPmh.php on line 553 #0 /var/www/drupal/web/modules/contrib/rest_oai_pmh/src/Plugin/rest/resource/OaiPmh.php(537): Drupal\rest_oai_pmh\Plugin\rest\resource\OaiPmh->getHeaderById()

Once I caught a boolean value at that location, the same error was presented inside of "getRecordMetadata."

I have created the attached patch which simply handles this situation without attempting to find the root cause of why $this->entity is returning a boolean in the first place.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States noahwsmith

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

Comments & Activities

Production build 0.69.0 2024