#50380 closed defect (bug) (fixed)
Check if _deprecated_file function exists in class-phpmailer.php
Reported by: | TimothyBlynJacobs | Owned by: | TimothyBlynJacobs |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Keywords: | has-patch has-dev-note | |
Focuses: | Cc: |
Description
The class-phpmailer.php
library is loaded early in the tests bootstrap, before wp-settings.php
is loaded. This means that the _deprecated_file
function is not available at this point. Core's test bootstrap was updated at the same time to point to the new file location which means it hasn't run into this issue. However, any other bootstraps, like wp-phpunit ( which is used by Gutenberg ) likely have not been updated.
This causes errors like:
Fatal error: Uncaught Error: Call to undefined function _deprecated_file() in /var/www/html/wp-includes/class-phpmailer.php:6
We could provide compatibility for those alternate test runners by first checking if the _deprecated_file
function exists before calling it.
Attachments (1)
Change History (7)
#3
@
4 years ago
- Keywords has-patch commit added; 2nd-opinion removed
Makes sense to me, let's try and see if that fixes the Gutenberg build.
This ticket was mentioned in Slack in #core-editor by timothybjacobs. View the logs.
4 years ago
#5
@
4 years ago
- Owner set to TimothyBlynJacobs
- Resolution set to fixed
- Status changed from new to closed
In 48034:
#6
@
4 years ago
- Keywords has-dev-note added; commit removed
This was mentioned in the following dev note: https://make.wordpress.org/core/2020/07/01/external-library-updates-in-wordpress-5-5-call-for-testing/
To note, I haven't been able to actually test that fixes the Gutenberg issue since everything is brought in dynamically, testing it is difficult. But I think it should.