Undefined index: width in theme_picture()

Created on 5 April 2016, about 8 years ago
Updated 19 September 2023, 9 months ago

Notice: Undefined index: width in theme_picture() (line 1407 of /......./sites/all/modules/contrib/picture/picture.module).

Notice: Undefined index: height in theme_picture() (line 1408 of /......./sites/all/modules/contrib/picture/picture.module).

Getting tons of these notices in watchdog.

Looking through the code it's unsetting $variables['width'] and $variables['height'] if they aren't good values, and then sets up the $dimensions width and height accordingly... but never sets $variables['width'] and $variables['height'] again.

Then on lines 1407 and 1408 it's trying to set the $dimensions width and height to $variables['width'] and $variables['height'] but it doesn't need to since $dimensions is already set correctly.

So either $variables['width'] and $variables['height'] should have their values set correctly when $dimensions width and height are set

OR $dimensions width and height on around line 1407 should only be set if $dimensions isn't already set.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand sphism

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 still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.

Production build 0.69.0 2024