#54142 closed defect (bug) (fixed)
Undefined array key "SCRIPT_NAME" in wp_fix_server_vars()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.9 | Priority: | normal |
| Severity: | normal | Version: | 2.0 |
| Component: | Bootstrap/Load | Keywords: | has-patch commit php8 php81 |
| Focuses: | Cc: |
Description
My log file is increasing size day by day with this bug:
[16-Sep-2021 21:37:01 UTC] PHP Warning: Undefined array key "SCRIPT_NAME" in /home/rntlckly/public_html/wp-includes/load.php on line 79
---
PHP 8.x
Wordpress 5.8.1
Attachments (2)
Change History (14)
#2
@
5 years ago
- Component changed from General to Bootstrap/Load
- Summary changed from Bug in wp-includes/load.php to Undefined array key "SCRIPT_NAME" in wp_fix_server_vars()
- Version changed from 5.8.1 to 2.0
This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.
5 years ago
This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.
4 years ago
#8
@
4 years ago
- Keywords commit added
- Owner changed from SergeyBiryukov to hellofromTonya
Assigning to me to check behavior of the PHP native function (for PHP 8.1) and if cool, get it committed.
#9
@
4 years ago
Noting: If the key doesn't exist, the error depends upon the PHP version:
- PHP 8.0+ throws a warning
- PHP 8.1 also throws a deprecation notice
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
- PHP 9 will likely be a fatal error
See it in action: ​https://3v4l.org/aJ2kX
Note: See
TracTickets for help on using
tickets.
Hi @mcjambi,
This issue is usually related to cron jobs, or server configuration, such as when running with fastcgi, etc. ​This support thread may be relevant to you.
If you are unable to resolve the issue from that thread, please create a new thread in ​the WordPress Support forums, providing some information about your server configuration and whether this is occurring when accessing WordPress via browser or if you're using another method.