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

[Issue] Avoid divide-by-zero fatal error #37804

Closed
5 tasks done
m2-assistant bot opened this issue Jul 27, 2023 · 3 comments · Fixed by #37479
Closed
5 tasks done

[Issue] Avoid divide-by-zero fatal error #37804

m2-assistant bot opened this issue Jul 27, 2023 · 3 comments · Fixed by #37479
Assignees
Labels
Area: Other Developer Tools Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@m2-assistant
Copy link

m2-assistant bot commented Jul 27, 2023

This issue is automatically created based on existing pull request: #37479: Avoid divide-by-zero fatal error


Description

While working on Ethan3600/magento2-CronjobManager#122, I noticed that providing asking Magento to validate a cron expression which contains /0 resulted in a Fatal error, rather than an exception which I could catch. This pull request fixes the divide-by-zero bug and instead produces a sensible exception. Includes unit test.

Manual testing scenarios

  1. Call \Magento\Cron\Model\Schedule::matchCronExpression('0/0', 0)

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 27, 2023
@m2-community-project m2-community-project bot added this to Pull Request In Progress in High Priority Backlog Jul 27, 2023
@engcom-Echo engcom-Echo added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jul 27, 2023
@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jul 27, 2023
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@engcom-Echo engcom-Echo added Area: Other Developer Tools Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jul 27, 2023
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-9207 is successfully created for this GitHub issue.

@m2-assistant
Copy link
Author

m2-assistant bot commented Jul 27, 2023

✅ Confirmed by @engcom-Echo. Thank you for verifying the issue.
Issue Available: @engcom-Echo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot github-jira-sync-bot added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Aug 21, 2023
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Aug 31, 2023
@m2-community-project m2-community-project bot added Progress: done and removed Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: PR in progress labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Other Developer Tools Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

Successfully merging a pull request may close this issue.

3 participants