[wp-trac] [WordPress Trac] #15344: global variables get cleared

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 8 17:24:42 UTC 2010


#15344: global variables get cleared
--------------------------+-------------------------------------------------
 Reporter:  OS1           |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.0.1          
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 It appears that global variables get cleared somewhere inside of WP. If I
 set a global variable then while I'm still in the function I set it in all
 is ok. Even if I step on and leave said function I can still see the
 global variable in NetBeans debugger. However, at some point I click
 continue, and the next time WP performs a filter on 'the_content' the
 global variable has been cleared. I am at the plugin top level so I have
 no class I can store this variable in and even if I did I assume I would
 need a pointer to this class instance and that would also need to be a
 global variable because of my scope!

 I am sure this used to work! Has something changed between 2.8 and 3.0.1
 in the way globals are handled? The forums and web seem to offer no help.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15344>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list