Opened 6 years ago
Closed 4 weeks ago
#45683 closed defect (bug) (worksforme)
WP 5.0.1 Throwing Warning on site when running PHP 7.1
Reported by: | Wendy__D | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0.1 |
Component: | Bootstrap/Load | Keywords: | |
Focuses: | Cc: |
Description
Visible warning appears when running 5.0.1 on PHP 7.1
"Warning: array_merge(): Argument #2 is not an array in /[redacted]/wp-includes/load.php on line 63" error appeared on front end after autoupdate to 5.0.1.
Error persistent on both themes twenty nineteen and twenty seventeen (although hidden behind the main image) with every plugin deactivated, and 5.0.1 freshly reinstalled. When I changed PHP version to 7.2 the error went away. Back to 7.1.25 it reappeared.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac! Thanks for the report.
The warning comes from this line in wp_fix_server_vars():
The line was added 9 years ago in [13812] for WordPress 3.0, and has not changed since then.
A quick search shows a blog post on the issue and a few posts on support forums. Some of the reports mention SiteGround hosting, and that renaming or removing the
php.ini
file in the site's root directory fixes the issue.That doesn't provide enough details yet, but apparently the issue happens if some security settings in
particular PHP configurations override or restrict access to the
$_SERVER
global variable.