Skip to content
Snippets Groups Projects

Issue #3306131: Passing null to parameter #1 ($path) of type string is deprecated on template_preprocess_image_style

Open Issue #3306131: Passing null to parameter #1 ($path) of type string is deprecated on template_preprocess_image_style
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -273,7 +273,7 @@ function template_preprocess_image_style(&$variables) {
// If the current image toolkit supports this file type, prepare the URI for
// the derivative image. If not, just use the original image resized to the
// dimensions specified by the style.
if ($style->supportsUri($variables['uri'])) {
if (isset($variables['uri']) && $style->supportsUri($variables['uri'])) {
$variables['image']['#uri'] = $style->buildUrl($variables['uri']);
}
else {
Loading