Opened 8 years ago
Closed 8 years ago
#45523 closed enhancement (duplicate)
PHP 7.3.0 raises E_NOTICE when compact() parameters do not refer to an existing variable
| Reported by: | ettoredn | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
It appears that since PHP 7.3.0 compact() raises E_NOTICE when passed variable names are undefined.
PHP Notice: compact(): Undefined variable: post_status in wp-admin/includes/post.php on line 1059
PHP Notice: compact(): Undefined variable: perm in wp-admin/includes/post.php on line 1059
PHP Notice: compact(): Undefined variable: order in wp-admin/includes/post.php on line 1059
PHP Notice: compact(): Undefined variable: orderby in wp-admin/includes/post.php on line 1059
Steps to reproduce:
- Install WP 5.0.0
- set error_reporting = E_ALL
- Log in the admin interface.
I get the feeling there a few other similar situations across the WP codebase.
Duplicate of #45483.