-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FocusFill doesn't check wether owner exists #59
Comments
probable some more exist-checks are needed to fix #58 https://github.com/jonom/silverstripe-focuspoint/blob/master/src/FieldType/DBFocusPoint.php#L32 |
Thanks @lerni. Any chance you would like to open a PR to fix this? |
Yeah, with pleasure. So you think what I said is the right approach? |
I think so, but maybe you could check what the behaviour is for built-in methods. Like if you call |
Fixed with #63 |
thank you @mikenz, somehow just never made it. |
If an Image gets deleted but references still exists, FocusFill & FocusFillMax 'll error like: "Uncaught InvalidArgumentException: Width is required". A check like if ($this->owner->exists()) in FocusFill would prevent this. Would it be aceptable to just wrap the return in such a condition?
The text was updated successfully, but these errors were encountered: