Opened 6 years ago
Closed 6 years ago
#7634 closed defect (bug) (fixed)
PHP 7.2 compatibility
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | needs-patch |
Cc: |
Description
Following [11753] the PHP 7.2, 6 tests in the PHP 7.2 Travis CIjobs are failing:
e.g. https://travis-ci.org/buddypress/BuddyPress/jobs/309634382:
There were 6 errors: 1) BP_Tests_Media_Extractor::test_extract_media_from_a_wp_post count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:3259 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:2102 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-actions.php:704 /tmp/wordpress/src/wp-includes/class-wp-hook.php:286 /tmp/wordpress/src/wp-includes/class-wp-hook.php:310 /tmp/wordpress/src/wp-includes/plugin.php:453 /tmp/wordpress/src/wp-includes/post.php:4038 /tmp/wordpress/src/wp-includes/post.php:3498 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php:27 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-media-extractor.php:152 2) BP_Tests_Media_Extractor::test_extract_images_from_content_with_galleries_variant_no_ids count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:3259 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:2102 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-actions.php:704 /tmp/wordpress/src/wp-includes/class-wp-hook.php:286 /tmp/wordpress/src/wp-includes/class-wp-hook.php:310 /tmp/wordpress/src/wp-includes/plugin.php:453 /tmp/wordpress/src/wp-includes/post.php:4038 /tmp/wordpress/src/wp-includes/post.php:3498 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php:27 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-media-extractor.php:303 3) BP_Tests_Media_Extractor::test_extract_no_images_from_content_with_invalid_galleries_variant_no_ids count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:3259 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:2102 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-actions.php:704 /tmp/wordpress/src/wp-includes/class-wp-hook.php:286 /tmp/wordpress/src/wp-includes/class-wp-hook.php:310 /tmp/wordpress/src/wp-includes/plugin.php:453 /tmp/wordpress/src/wp-includes/post.php:4038 /tmp/wordpress/src/wp-includes/post.php:3498 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php:27 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-media-extractor.php:344 4) BP_Tests_Media_Extractor::test_extract_no_images_from_content_with_featured_image count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:3259 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:2102 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-actions.php:704 /tmp/wordpress/src/wp-includes/class-wp-hook.php:286 /tmp/wordpress/src/wp-includes/class-wp-hook.php:310 /tmp/wordpress/src/wp-includes/plugin.php:453 /tmp/wordpress/src/wp-includes/post.php:4038 /tmp/wordpress/src/wp-includes/post.php:3498 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php:27 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-media-extractor.php:371 5) BP_Tests_Media_Extractor::test_extract_images_from_content_without_featured_image count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:3259 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-functions.php:2102 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-activity/bp-activity-actions.php:704 /tmp/wordpress/src/wp-includes/class-wp-hook.php:286 /tmp/wordpress/src/wp-includes/class-wp-hook.php:310 /tmp/wordpress/src/wp-includes/plugin.php:453 /tmp/wordpress/src/wp-includes/post.php:4038 /tmp/wordpress/src/wp-includes/post.php:3498 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php:27 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-media-extractor.php:392 6) BP_Tests_Members_Functions::test_bp_last_activity_migrate count(): Parameter must be an array or an object that implements Countable /tmp/wordpress/src/wp-includes/meta.php:194 /tmp/wordpress/src/wp-includes/user.php:825 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/members/functions.php:364
Related: #WP40109
Attachments (1)
Change History (14)
#2
@
6 years ago
We need to do a review for create_function()
calls. http://php.net/manual/en/migration72.deprecated.php
#6
@
6 years ago
(Backporting to 2.9 branch) I think it's a great idea, it'll make the next minor release fab.
Note: See
TracTickets for help on using
tickets.
The media extractor one was fixed the other day.
The rest, I think this is upstream WordPress. Going to look at it.