Opened 9 years ago
Closed 9 years ago
#7204 closed defect (bug) (fixed)
Unit tests failing on PHP 7.0.9
| Reported by: |  | Owned by: |  | 
|---|---|---|---|
| Milestone: | 2.7 | Priority: | normal | 
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | |
| Cc: | 
Description
From Travis-CI. Suspected cause is a change in their environment which they moved from PHP 7.0.8 to 7.0.9. I don't know if this only affects the test or actually some feature in BuddyPress. Move the milestone appropriately.
There were 6 errors: 1) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_upload Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:319 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:160 2) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_upload_no_base_dir_specific_time Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:365 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:205 3) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_avatar_user_upload Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:365 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:241 4) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_avatar_group_upload Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:365 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:294 5) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_cover_image_user_upload Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:365 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:368 6) BP_Tests_BP_Attachment_TestCases::test_bp_attachment_upload_dir_filter_arg Parameter 1 to BP_Tests_BP_Attachment_TestCases::upload_error_handler() expected to be a reference, value given /tmp/wordpress/src/wp-admin/includes/file.php:365 /tmp/wordpress/src/wp-admin/includes/file.php:449 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-core/classes/class-bp-attachment.php:272 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/core/class-bp-attachment.php:492
Change History (5)
    
      
         
        
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
      
      
9 years ago
    
    
  
              
    
      
    #4
  
    
        
          
             @
 @
            
9 years ago
        
    
  
  
  - Milestone changed from 2.6.2 to 2.7
Uploads themselves appear to be working properly and without throwing notices, presumably because when running from the front end, we aren't defining a custom upload_error_handler().
I'm going to remove the reference requirement from the method signature. We can reassess when/if the PHP bug is addressed.
Upstream PHP Bug https://bugs.php.net/bug.php?id=72598 via #WP37295