Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
For some reason the call to Drupal\Core\Url::fromUri() is not very fault tolerant and fails with a fatal error
The website encountered an unexpected error. Please try again later.InvalidArgumentException: The URI 'tel:911' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 281 of core/lib/Drupal/Core/Url.php).
If the block is displayed on node edit, it prevents fixing the content. This needs to be more fault tolerant such that a failure of link lookup does not prevent all access to the page.
Comments
Comment #3
swirtI added a check for a specific php bug with parse_url().
https://bugs.php.net/bug.php?id=70588
I also placed some of the logic within a try catch to offer some minimal protection against errors.
There are still some risks, but this is better.
Comment #4
swirt