fix: guard multiple accounts query context - #1714
Conversation
📝 WalkthroughWalkthrough
ChangesMultiple accounts compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php (1)
23-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for an unset
func_callproperty.This test assigns
nullto$wpdb->func_call. It does not exercise the unset-property path handled by the new??fallback.Add a separate test or data-provider case that calls
unset($wpdb->func_call)and verifies thatfix_user_query()returns the original query. Preserve the existingfinallycleanup.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php` around lines 23 - 29, Add a separate test or data-provider case alongside test_fix_user_query_tolerates_null_func_call that unsets $wpdb->func_call before calling fix_user_query(), asserts the original query is returned, and preserves the existing finally-based restoration cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php`:
- Around line 23-29: Add a separate test or data-provider case alongside
test_fix_user_query_tolerates_null_func_call that unsets $wpdb->func_call before
calling fix_user_query(), asserts the original query is returned, and preserves
the existing finally-based restoration cleanup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9233096e-6805-4602-80ef-078b532447b1
📒 Files selected for processing (2)
inc/compat/class-multiple-accounts-compat.phptests/WP_Ultimo/Multiple_Accounts_Compat_Test.php
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Verification
Merged via PR #1714 to main. |
|
DISPATCH_CLAIM nonce=486e293e840cad1691619180ce2ed2fd runner=superdav42 ts=2026-08-11T19:08:13Z max_age_s=120 version=3.32.251 opencode_version=1.18.9 lease_token=486e293e840cad1691619180ce2ed2fd device=device-1783824528-2609248-26808 session=issue-1714 phase=prelaunch expires_at=1786475415 |
|
REVIEW_FOLLOWUP_CREATED source_pr=1714 issue=1722 fingerprint=source-pr-1714 runner=superdav42 ts=2026-08-11T19:08:35Z |
Summary
Verification
Summary by CodeRabbit
Bug Fixes
Tests