- Issue created by @JSchref
It is worth noting that, if this module isn't found, createImageUrl() doesn't have a return at all, and a better defensive coding solution should be sought.
- @jschref opened merge request.
Apparently patching info.yml files is extra fun? No change, just fewer lines in the patch.
- 🇳🇱Netherlands seanB Netherlands
The
createImageUrl()
method contains a check for the module. So it is definitely not a required dependency, the support for it is optional.// If we do not have a stream wrapper, it might be an external URL. If the // imagecache_external module is installed, try to get a local URI using // that module. if (\Drupal::moduleHandler()->moduleExists('imagecache_external')) { $stream_wrapper = \Drupal::service('stream_wrapper_manager')->getViaUri($uri); if (!$stream_wrapper) { $uri = imagecache_external_generate_path($uri); } }
What does
createImageUrl()
return ifuri
is truthy and\Drupal::moduleHandler()->moduleExists('imagecache_external')
is falsy?- 🇳🇱Netherlands seanB Netherlands
Yeah, I don't think you need that patch anymore. The type hint changes are committed and should solve the issue. Could you confirm this and close this issue if it is resolved?
- Status changed to Closed: works as designed
about 1 year ago 7:15pm 9 November 2023