Arrays are being passed to Image Module, image_style_load(), instead of the style name

Created on 13 November 2014, about 10 years ago
Updated 19 September 2023, about 1 year ago

Fresh install on 7.33 returns:

Warning: Illegal offset type in isset or empty in image_style_load() (line 645 of C:\wamp\www\ilt\modules\image\image.module).

I'm using Breakpoint and Scald, however I've spent some time trying to locate the source of the $style_name array which is being passed and it seems to be getting passed at the following function within picture.module.

function _picture_image_style_url($style_name, $path) {
  if ($style_name == PICTURE_EMPTY_IMAGE) {
    return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
  }
  if ($style_name == PICTURE_ORIGINAL_IMAGE) {
    return file_create_url($path);
  }

  return image_style_url($style_name, $path);
}

The array in place of the style name is (this is what image.module recieves as $name):

Array
(
    [mapping_type] => image_style
    [image_style] => section_headers__custom_user_wide_1x
)

section_headers__custom_user_wide_1x - this is the correct style name.

🐛 Bug report
Status

Closed: outdated

Version

2.7

Component

Code

Created by

🇳🇿New Zealand dkre

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom lesleyfernandes

    I am closing all very old tickets that have not received comments for a long time. If someone is still facing these issues, please reopen it. Feel free to contribute with more info or a patch.

Production build 0.71.5 2024