[wp-trac] Re: [WordPress Trac] #5860: Activating plugin that uses upgrade functions (dbDelta) fails

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 15 02:47:32 GMT 2008


#5860: Activating plugin that uses upgrade functions (dbDelta) fails
----------------------------+-----------------------------------------------
 Reporter:  jhodgdon        |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  normal          |    Milestone:  2.5      
Component:  Administration  |      Version:  2.5      
 Severity:  critical        |   Resolution:           
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------
Comment (by darkdragon):

 Replying to [comment:3 ryan]:
 > The plugin is now being loaded within activate_plugin().  When
 upgrade.php is included, it is not in global context.  We might need to
 sprinkle some "global" statements around.
 [[BR]]

 This is interesting. So a plugin including another file will also be
 within that functions scope, unless it was inside a function, then it
 would be within its own function scope.

 That is quite fascinating. However, the scope of it would be instead
 inside the plugin function, so the global should be declared there and not
 in the core file.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5860#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list