Call to a member function getExternalUrl() on bool in TextExtractorPluginBase->getRealpath()

Created on 16 July 2023, over 1 year ago

Problem/Motivation

When invoking the getRealpath() function in Drupal's Search API Attachments module, an error is encountered:
Error: Call to a member function getExternalUrl() on bool in Drupal\search_api_attachments\TextExtractorPluginBase->getRealpath() (line 155 of modules/contrib/search_api_attachments/src/TextExtractorPluginBase.php).
This error occurs when the $wrapper variable is evaluated as a boolean (bool) value (false) instead of an object.

Steps to reproduce

Run the site system cron.

Proposed resolution

Add appropriate error handling in the code to handle scenarios where the wrapper cannot be retrieved ($wrapper evaluates to false) and return null.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

🐛 Bug report
Status

Active

Version

9.0

Component

Code

Created by

🇯🇴Jordan mohammad-fayoumi Amman

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

Comments & Activities

Production build 0.71.5 2024