-
Notifications
You must be signed in to change notification settings - Fork 39
Fix square styling error when using multiple fonts in font family sty… #2607
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
Fix square styling error when using multiple fonts in font family sty… #2607
Conversation
|
Warning Rate limit exceeded@Crabcyborg has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 39 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughModified the font parsing logic in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
square/controllers/FrmSquareLiteActionsController.php(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: Cypress
- GitHub Check: Cypress
🔇 Additional comments (1)
square/controllers/FrmSquareLiteActionsController.php (1)
583-583: Fix the edge case where a comma at position 0 would be treated as false.Using
strpos()directly in a boolean context has a known edge case: if the comma appears at position 0,strposreturns0, which is falsy in PHP. While unlikely in practice, this would cause the code to use the malformed font string instead of extracting the first font.Apply this diff to fix the edge case:
- if ( ! empty( $settings['font'] ) ) { - if ( false !== strpos( $settings['font'], ',' ) ) { + if ( ! empty( $settings['font'] ) ) { + if ( strpos( $settings['font'], ',' ) !== false ) {Likely an incorrect or invalid review comment.
…le setting