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

Add null check to isManualCaptureEnabled method of AdminController #480

Conversation

SpiGAndromeda
Copy link
Contributor

Summary

The additional null check allows the method to return early of no Adyen transaction was found instead of relying that an exception is thrown. Because the original intend of the try-catch was to catch any exception, the catch clause is changed to catch all Throwables (possible since PHP 7).

I removed the variable from the catch clause in the first place. But because this plugin has to be compatible with Shopware 6.4, it has to be PHP 7.4 compatible. Catch clauses without variable are allowed since PHP 8.

Tested scenarios

None

Fixed issue: #479

@SpiGAndromeda SpiGAndromeda requested a review from a team as a code owner April 17, 2024 19:42
Copy link

sonarcloud bot commented Apr 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@candemiralp candemiralp merged commit f29044b into Adyen:develop May 2, 2024
5 of 6 checks passed
@candemiralp
Copy link
Member

Hello @SpiGAndromeda,

Thank you for your contribution. This PR has been merged.

Best regards,
Can

@candemiralp candemiralp mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants