Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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