Please sign in to comment.
Port all remaining WP changes for PHP 7.3 compatibility (#359)
Closes #263. ---- * WP-r43975: Build/Test Tools: Use 7.3 for PHP 7.3 Travis now supports PHP7.3 without workarounds, so let's remove the workarounds. Merges https://core.trac.wordpress.org/changeset/43726 to trunk. See https://core.trac.wordpress.org/ticket/44771. Conflicts: .travis.yml ---- Merges https://core.trac.wordpress.org/changeset/43975 / WordPress/wordpress-develop@b4d7e7a to ClassicPress. * WP-r43819: php7.3 compatibility: Fix compact throwing notices In PHP 7.3, the compact() function has been changed to issue an E_NOTICE level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. The full RFC can be viewed here: https://wiki.php.net/rfc/compact This fixes all unit tested code that uses compact. WP:Props desrosj. Fixes https://core.trac.wordpress.org/ticket/44416. ---- Merges https://core.trac.wordpress.org/changeset/43819 / WordPress/wordpress-develop@5a3ad21 to ClassicPress. * WP-r43899: Nav Menus: Fix a PHP 7.3 error when switching themes. When switching themes, `wp_map_nav_menu_locations()` is used to ensure nav menus are placed in the relevant menu location. Occasionally, menus are registered to locations with numeric slugs, rather than strings. `wp_map_nav_menu_locations()` assumed it would be the latter, and ran `stripos()` on those numeric slugs. This behaviour is deprecated in PHP 7.3. As this is the last known PHP 7.3 incompatibility, this commit also removes PHP 7.3 from Travis' `allowed_failures` list. WP:Props desrosj, jorbin. See https://core.trac.wordpress.org/ticket/45018. ---- Merges https://core.trac.wordpress.org/changeset/43899 / WordPress/wordpress-develop@61ee6d9 to ClassicPress. * Fix whitespace errors * WP-r44186: Networks and Sites: Fix incorrect variable location. This fixes an issue introduced in https://core.trac.wordpress.org/changeset/44166 where the `$groupby` variable was inserted too low in the `get_site_ids()` function while merging https://core.trac.wordpress.org/changeset/43832 into `trunk`. The merged location did not account for a new conditional statement that existed only in `trunk`, and would have resulted in values assigned to `$groupby` being erased in certain scenarios. WP:Props spacedmonkey. See https://core.trac.wordpress.org/ticket/44416. Fixes https://core.trac.wordpress.org/ticket/45582. ---- Merges https://core.trac.wordpress.org/changeset/44186 / WordPress/wordpress-develop@7f23254 to ClassicPress.
- Loading branch information...
Showing with 91 additions and 35 deletions.
- +2 −1 .travis.yml
- +3 −1 src/wp-includes/class-wp-comment-query.php
- +2 −3 src/wp-includes/class-wp-site-query.php
- +43 −26 src/wp-includes/class-wp-xmlrpc-server.php
- +1 −1 src/wp-includes/comment.php
- +6 −2 src/wp-includes/nav-menu.php
- +8 −1 src/wp-includes/post.php
- +1 −0 tests/phpunit/tests/dependencies/scripts.php
- +25 −0 tests/phpunit/tests/menu/nav-menu.php