Islandora / islandora

Drupal modules for browsing and managing digital repositories.
http://islandora.ca/
GNU General Public License v2.0
152 stars 118 forks source link

DDST-312: Addressing a warning when `search_endpoint` option isn't set #1035

Closed nchiasson-dgi closed 4 months ago

nchiasson-dgi commented 4 months ago

GitHub Issue: N/A

What does this Pull Request do?

Adds a null coalescing operator when attempting to read the search_endpoint option and a null-check in the event that it hasn't been set, and handle the following warning:

Warning: Undefined array key "search_endpoint" in Drupal\islandora_iiif\Plugin\views\style\IIIFManifest->addSearchEndpoint() (line 497 of path/to/files/islandora/modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php).

What's new?

Adds a null coalescing operator when attempting to read the search_endpoint variable. Then performs a null-check before executing operations with that value that may not exist.

How should this be tested?

Load a page where the addSearchEndpoint function is called, but the search_endpoint option is not set.

Interested parties

@Islandora/committers