Problem/Motivation

The autorotate action throws the following error with php 7.4
Notice: Undefined property: stdClass::$extension in image_imagemagick_imagecache_autorotate() (line 232 of C:\www\....\sites\all\modules\contrib\imagecache_actions\autorotate\imagecache_autorotate.module).

this function is looking for the file extension in $image->extension which does not exists, its actually in $image->info['extension]

Steps to reproduce

Using imagemagick render an image that has no EXIF data using a style with the autorotate action

Proposed resolution

either use $image->info['extension] or remove the extension check entirely (the latter is what is done in the GD version)

Comments

loze created an issue. See original summary.

fietserwin’s picture

Title: Undefined property when using autorotate and imagemagick on images with no EXIF data » Notice: Undefined property: stdClass::$extension in image_imagemagick_imagecache_autorotate()
Status: Active » Fixed

Thanks for reporting.

I chose your 1st proposed solution. Fixed and committed. I will release a new version so that it will be easily available for everyone.

  • fietserwin committed 7d89bc9 on 7.x-1.x authored by loze
    [#3255527] by loze, fietserwin: Notice: Undefined property: stdClass::$...

Status: Fixed » Closed (fixed)

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