GH#839: test: remove redundant unserialize() calls on get_post_meta() results (GH#839)#845
Conversation
Completion Summary
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 54 minutes and 5 seconds. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 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: |
… (GH#839) get_post_meta($id, $key, true) already applies maybe_unserialize() internally, so calling unserialize() again on the returned value fails in PHP 8+ because the value is already an array, not a serialized string. Two remaining occurrences in verify_attachment_backfill() and verify_elementor_backfill() were missed by commit dd3461d. This removes them, completing the fix for all three instances flagged in PR #825 review. Fixes #839
2bb772d to
1bd9d4c
Compare
|
Performance Test Results Performance test results for 9f3e31a are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
🔨 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
Removed two remaining redundant unserialize() calls on get_post_meta() results in Site_Duplicator_Postmeta_Test.php. WordPress get_post_meta($id, $key, true) already applies maybe_unserialize() internally, so wrapping with unserialize() fails in PHP 8+ when the returned value is already an array. Commit dd3461d fixed one of three occurrences; this commit fixes the other two in verify_attachment_backfill() and verify_elementor_backfill().
Files Changed
tests/WP_Ultimo/Helpers/Site_Duplicator_Postmeta_Test.php
Runtime Testing
Resolves #839
aidevops.sh v3.8.24 plugin for OpenCode v1.4.3 with claude-sonnet-4-6 spent 1m and 2,895 tokens on this as a headless worker.