PHP 7.4 addes a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.
This change fixes all of these warnings visible in unit tests.
Props jrf.
See #47704.
git-svn-id: https://develop.svn.wordpress.org/trunk@45639 602fd350-edb4-49c9-b593-d223f7449a82
The Hash extension cannot be disabled as of PHP 7.4. So, while we can't remove these polyfills yet, we can document when we'll be able to.
Props jrf.
Fixes#47698.
git-svn-id: https://develop.svn.wordpress.org/trunk@45638 602fd350-edb4-49c9-b593-d223f7449a82
As of PHP 5.3, the SPL extension cannot be disabled, so we no longer need this polyfill.
The file is kept with a `_deprecated_file()` call, to alert any plugins or themes that may be loading it directly.
Props jrf, ayeshrajans.
See #47698, #46630.
git-svn-id: https://develop.svn.wordpress.org/trunk@45637 602fd350-edb4-49c9-b593-d223f7449a82
This adds a new method, `wpdb::log_query()`, and a new filter, `log_query_custom_data`. The custom data is stored as a new element in each entry of the `wpdb::$queries` array.
Props CrazyJaco, johnbillion, pento.
Fixes 42151.
git-svn-id: https://develop.svn.wordpress.org/trunk@45635 602fd350-edb4-49c9-b593-d223f7449a82
Since the function uses `get_avatar_url()` internally, which already supports it, this should not have any backward compatibility concerns.
Props donmhico, dshanske, pputzer, joehoyle, TimothyBlynJacobs.
Fixes#40030.
git-svn-id: https://develop.svn.wordpress.org/trunk@45632 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45630 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45629 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf, pento.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45628 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45627 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf, pento.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45625 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45624 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45623 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props jrf.
See #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@45622 602fd350-edb4-49c9-b593-d223f7449a82
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.
See #46732.
git-svn-id: https://develop.svn.wordpress.org/trunk@45611 602fd350-edb4-49c9-b593-d223f7449a82
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked.
Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments.
Props @kjellr.
Fixes#46778.
git-svn-id: https://develop.svn.wordpress.org/trunk@45606 602fd350-edb4-49c9-b593-d223f7449a82
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments.
Props @kjellr, @dianeco.
Fixes#46750.
git-svn-id: https://develop.svn.wordpress.org/trunk@45605 602fd350-edb4-49c9-b593-d223f7449a82
Twentys Eleven, Sixteen, and Seventeen now have translator comments for all their strings.
Also, WPCS now doesn't show missing translator comment warnings for test files.
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45604 602fd350-edb4-49c9-b593-d223f7449a82