Skip to content

Added property check on Tika responses#116

Open
SpaceCafe wants to merge 1 commit into
catalyst:MOODLE_310_STABLEfrom
SpaceCafe:fix/tika-content-property
Open

Added property check on Tika responses#116
SpaceCafe wants to merge 1 commit into
catalyst:MOODLE_310_STABLEfrom
SpaceCafe:fix/tika-content-property

Conversation

@SpaceCafe

Copy link
Copy Markdown

Occasionally, Apache Tika responses may not include an X-TIKA:content property, causing the following error to be thrown: PHP Warning: Undefined property: stdClass::$X-TIKA:content on line 159 in search/engine/elastic/classes/enrich/text/tika.php.

Occasionally, Apache Tika responses may not include an `X-TIKA:content` property, causing the following error to be thrown: `PHP Warning:  Undefined property: stdClass::$X-TIKA:content` on line 159 in `search/engine/elastic/classes/enrich/text/tika.php`.

Signed-off-by: Lars Thoms <lars@thoms.io>
@dmitriim

Copy link
Copy Markdown
Member

Hi @SpaceCafe ! Thanks for providing a patch. Can you please create an issue first describing the error that you are having. That can help people with the same issue see that it has been fixed.

Also why does Tika responses not include an X-TIKA:content property? What does this mean from tika point of view? Should we treat it as an error and throw an exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants