Fix undefined array key warning in maybe_add_utm_license#2601
Conversation
WalkthroughA guard condition is added to the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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). (9)
🔇 Additional comments (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
| */ | ||
| private static function maybe_add_utm_license( $query_args ) { | ||
| if ( 'pro' === $query_args['utm_medium'] && is_callable( 'FrmProAddonsController::get_readable_license_type' ) ) { | ||
| if ( isset( $query_args['utm_medium'] ) && 'pro' === $query_args['utm_medium'] && is_callable( 'FrmProAddonsController::get_readable_license_type' ) ) { |
There was a problem hiding this comment.
@shervElmi This doesn't look super ideal.
If this wasn't set, it must mean that the link already has a utm_medium. Ideally we would still check for that and still add a license, rather than do nothing.
|
Since this issue is causing our unit tests to fail, I went ahead and made a new PR #2606 Closing this one. |
Fixes an undefined array key warning when
utm_mediumis not present in the query args.Demo