WordPress Release: 4.4.12
Tag Name: 4.4.12
Release Date: 10/31/2017
WordPressWorld's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.
TL;DR
WordPress 4.4.12 is a maintenance release that addresses two important issues: a bug in the PHPUnit testing framework and the restoration of numbered placeholders in wpdb::prepare(). This release ensures backward compatibility for plugins and themes that rely on numbered placeholders in database queries, while also improving the testing infrastructure for developers.
Highlight of the Release
- Restored support for numbered placeholders in
wpdb::prepare()database queries - Fixed PHPUnit test issues with proper message argument handling
- Added extra validation for database query preparation
Migration Guide
No migration is required for this release. The changes are backward compatible and designed to maintain functionality for existing code.
If you were affected by the previous removal of numbered placeholders in wpdb::prepare(), this release will restore that functionality, allowing your code to work as expected again without modifications.
Upgrade Recommendations
This is a recommended upgrade for all WordPress 4.4 users, especially for sites running plugins or themes that may use numbered placeholders in database queries. The release restores backward compatibility while improving code safety.
As always with any WordPress update, it's recommended to backup your site before upgrading.
Bug Fixes
Database Query Preparation Fix
Restored support for numbered placeholders in wpdb::prepare(). A previous update (in [41496]) had removed support for these placeholders, which despite being undocumented, were commonly used in many plugins and themes. This fix ensures backward compatibility for existing code while also adding extra validation to ensure the correct number of arguments are passed to the function based on the number of placeholders.
PHPUnit Testing Framework Fix
Fixed an issue in the WordPress testing framework where the $message argument wasn't being correctly passed to WP_UnitTestCase::setExpectedException() in specific test cases (Tests_Ajax_CompressionTest::test_logged_out() and Tests_Ajax_TagSearch::test_no_results()). This issue had gone unnoticed because PHPUnit 6.4.1 and earlier versions ignored the '0' value.
New Features
No new features were added in this maintenance release. The focus was on fixing bugs and maintaining compatibility.
Security Updates
No security fixes were explicitly mentioned in this release.
Performance Improvements
No specific performance improvements were included in this release.
Impact Summary
WordPress 4.4.12 is primarily a compatibility and bug fix release that addresses two specific issues:
-
It restores support for numbered placeholders in
wpdb::prepare(), which had been removed in a previous update. This change is significant because many plugins and themes relied on this undocumented but widely used feature. The restoration ensures backward compatibility while also adding safety checks to validate the correct number of arguments. -
It fixes an issue in the WordPress testing framework related to how message arguments are passed to exception handling in PHPUnit tests.
These changes maintain WordPress's commitment to backward compatibility while improving the robustness of the codebase. Site administrators should experience improved stability, particularly if their sites use plugins that rely on numbered placeholders in database queries.
Statistics:
User Affected:
- Restored support for numbered placeholders in `wpdb::prepare()`, maintaining backward compatibility for existing code
- Improved PHPUnit test functionality with proper message argument handling in `setExpectedException()`
- Added extra checks to ensure the correct number of arguments are passed to `wpdb::prepare()`
