Skip to content

Commit

Permalink
Fix assets not being indexed on php 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mosnar authored Apr 12, 2024
1 parent 9008237 commit 67c0d48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Document Search Changelog

## 1.0.4 - 2024-04-11
### Fixed
- Incorrect type comparison on strict comparison causing volumes not to be indexed.

## 1.0.3 - 2020-10-27
### Fixed
- Fix environment variable for pdftotext path not working (#5)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "venveo/craft-documentsearch",
"description": "Extract the contents of text documents and add to Craft's search index",
"type": "craft-plugin",
"version": "1.0.3",
"version": "1.0.4",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/services/DocumentContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function getAssetContentKeywords(Asset $asset): ?string
// check to make sure the volume is allowed to be indexed
/** @var Volume $volume */
$volume = $asset->getVolume();
if (!in_array($volume->id, $settings->indexVolumes, true)) {
if (!in_array((string)$volume->id, $settings->indexVolumes, true)) {
return null;
}

Expand Down

0 comments on commit 67c0d48

Please sign in to comment.