Undefined variable "ext" when saving custom image field
marceickhoff opened this issue · 3 comments
marceickhoff commented
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 commented
@marceickhoff Will take a look when I look at #1259
Radiergummi commented
@CraigChilds94 We create the pathInfo, we just don't use it: anchor/models/extend.php#L209