Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a null check for the $paragraph_entity #128

Merged

Conversation

nchiasson-dgi
Copy link
Contributor

GitHub Issue: N/A

What does this Pull Request do?

The $paragraph_entity variable could be set as null and then immediately have a member function attempt to be called on it, resulting in the following error:

Fatal error: Uncaught Error: Call to a member function hasField() on null in /path/to/files/controlled_access_terms/src/Plugin/search_api/processor/EDTFYear.php:254

What's new?

Adding a null check for the $paragraph_entity.

  • Does this change require documentation to be updated? No.
  • Does this change add any new dependencies? No.
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No.
  • Could this change impact execution of existing code? Yes.

How should this be tested?

Enabling the EDTF Year processor and indexing the edtf_year field.

Interested parties

@Islandora/committers

@rosiel rosiel requested review from bibliophileaxe and removed request for bibliophileaxe July 3, 2024 17:20
@jordandukart jordandukart self-assigned this Jul 3, 2024
@jordandukart jordandukart merged commit 96dfd66 into Islandora:2.x Jul 3, 2024
9 checks passed
@nchiasson-dgi nchiasson-dgi deleted the fix/edtfyear-null-paragraph branch July 8, 2024 13:15
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