This issue is to fix failing test - https://drupal.org/node/2009662#comment-7569357. The changes below are out of scope for 'Replace theme() with drupal_render() in picture module'

Undefined index: uri
Undefined index: dimensions

     'picture' => array(
       'variables' => array(
         'style_name' => NULL,
-        'path' => NULL,
+        'uri' => NULL,
         'width' => NULL,
         'height' => NULL,
         'alt' => '',
@@ -163,7 +163,7 @@ function picture_theme() {
       'variables' => array(
         'src' => NULL,
         'srcset' => NULL,
-        'dimension' => NULL,
+        'dimensions' => NULL,
         'media' => NULL,
CommentFileSizeAuthor
#1 undefined-variables-2026319-1.patch689 bytespplantinga

Comments

pplantinga’s picture

StatusFileSize
new689 bytes

Just rolled the changes into a patch.

pplantinga’s picture

Status: Active » Needs review

Oh yeah, status.

pplantinga’s picture

Title: Undefined index: uri and Undefined index: dimensions in picture.module » Mis-named variables in picture_theme()

Updated title to be more cause and less effect. Can someone take a look at it, it's blocking #2009662: [REGRESSION] Replace theme() with drupal_render() in picture module ?

thedavidmeister’s picture

Assigned: pwieck » Unassigned
Issue tags: +theme system cleanup
thedavidmeister’s picture

I can confirm that 'uri' looks like the correct variable name for theme_picture(), not only is it actually used in theme_picture() but it is passed to theme_image_style() which is looking for $variables['uri'] too.

thedavidmeister’s picture

Status: Needs review » Reviewed & tested by the community

theme_picture_source() is using $variables['dimensions'] too.

Patch looks good.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c1f73e6 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

eli-t’s picture

Component: picture.module » responsive_image.module
Issue summary: View changes