Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Undefined variable "ext" when saving custom image field #1257

Closed
marceickhoff opened this issue Feb 23, 2018 · 3 comments
Closed

Undefined variable "ext" when saving custom image field #1257

marceickhoff opened this issue Feb 23, 2018 · 3 comments
Assignees

Comments

@marceickhoff
Copy link

marceickhoff commented Feb 23, 2018

Summary

The method resizeImage in anchor/models/extend.php causes an exception because the variable ext is undefined. This happens when saving (and resizing) an image from a custom image field.

Expected Behaviour

The variable ext should contain the image file extension.

Actual Behaviour

It doesn't. It's undefined.

Context details

  • Anchor version: 0.12.6

Possible solution

Define the variable:

$ext = pathinfo($filepath, PATHINFO_EXTENSION);

@CraigChilds94
Copy link
Member

@marceickhoff Will take a look when I look at #1259

@CraigChilds94 CraigChilds94 self-assigned this Mar 2, 2018
@Radiergummi
Copy link
Member

@CraigChilds94 We create the pathInfo, we just don't use it: anchor/models/extend.php#L209

@TheBrenny TheBrenny mentioned this issue Jan 6, 2019
@TheBrenny
Copy link
Member

Closing because #1306 fixes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants