[wp-trac] Re: [WordPress Trac] #6308: Plugin variable scope issue
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 22 07:04:57 GMT 2009
#6308: Plugin variable scope issue
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 2.8
Component: Administration | Version: 2.5
Severity: minor | Keywords: dev-feedback has-patch commit
-------------------------------+--------------------------------------------
Changes (by DD32):
* keywords: dev-feedback needs-patch => dev-feedback has-patch commit
* milestone: 2.9 => 2.8
Comment:
Plugins shouldnt be setting generically named global variables, nor
executing code (aside from Plugin API functions & initiating classes) in
global scope.
> attachment 6308.diff added
* Cleans up the $plugin variable after the plugins are included, Just for
safty precautions for anything else which uses the $plugin variable in
global scope elsewhere.
* some extra spacing
I feel that this would probably suffice for this ticket. Leaving the rest
up to plugin devs best practive (of avoiding global variables in PHP)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/6308#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list