Skip to content
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

[BUGFIX] Allow cropperdata to be null #89

Merged
merged 1 commit into from Feb 5, 2023
Merged

Conversation

Woeler
Copy link
Contributor

@Woeler Woeler commented Jan 12, 2023

If the cropper is disabled, the cropperdata will be null. The docblock above the method also says that it can be null, but the method signature doesnt allow null.

[2023-01-12 10:02:25] local.ERROR: Ctessier\NovaAdvancedImageField\AdvancedImage::transformImage(): Argument #2 ($cropperData) must be of type object, null given, called in /var/www/html/vendor/ctessier/nova-advanced-image-field/src/AdvancedImage.php on line 59 {"userId":1,"exception":"[object] (TypeError(code: 0): Ctessier\\NovaAdvancedImageField\\AdvancedImage::transformImage(): Argument #2 ($cropperData) must be of type object, null given, called in /var/www/html/vendor/ctessier/nova-advanced-image-field/src/AdvancedImage.php on line 59 at /var/www/html/vendor/ctessier/nova-advanced-image-field/src/TransformableImage.php:147)
[stacktrace]

@sonarcloud
Copy link

sonarcloud bot commented Jan 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ctessier ctessier added the bug Something isn't working label Feb 5, 2023
@ctessier
Copy link
Owner

Pull request released in v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants