Opened 2 months ago
Last modified 2 months ago
#62984 new defect (bug)
Find some "global variables" are missing to define into the WordPress core files.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
Description
Hello team,
I have checked WordPress core file and I have found this "Overriding WordPress globals is prohibited." errors into the few files.
Also, I have found that some variables need to define globally into the few core files.
Here, I have mentioned few files list:
/src/wp-admin/menu-header.php
/src/wp-admin/menu.php
/src/wp-includes/shortcodes.php
/src/wp-includes/version.php
Thanks,
Attachments (1)
Change History (5)
#1
@
2 months ago
- Keywords needs-refresh added; dev-feedback needs-testing removed
- Version trunk deleted
@viralsampat Your attached 62984.patch patch shows wrong version 6.2-alpha-54642-src
#3
@
2 months ago
The variables in version.php are not always globals, the documentation is somewhat misleading. They're global when version.php is included in the global scope, but it also gets included in local scope during the upgrade process.
Explicitly declaring version.php variables as global will break updates. If someone wants to open a PR with this change, fingers crossed it gets picked up by tests. If not, the tests need improving.
This ticket was mentioned in PR #8356 on WordPress/wordpress-develop by @sukhendu2002.
2 months ago
#4
- Keywords has-patch added; needs-refresh removed
Trac ticket: http://core.trac.wordpress.org/ticket/62984
I have checked above mentioned issue and I have resolved it and added patch.