[wp-trac] [WordPress Trac] #11518: Fatal error: Call to undefined method WP_Error::__destruct()

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 24 12:33:33 UTC 2009


#11518: Fatal error: Call to undefined method WP_Error::__destruct()
----------------------------+-----------------------------------------------
 Reporter:  westi           |        Owner:        
     Type:  defect (bug)    |       Status:  closed
 Priority:  normal          |    Milestone:  2.9.1 
Component:  Administration  |      Version:  2.9   
 Severity:  normal          |   Resolution:  fixed 
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by hakre):

 Replying to [comment:18 miqrogroove]:
 > (I guess that's what westi meant by "the default for feeds")
 >
 > Anyway patch looks good.  Thanks for the reminder that PHP5 doesn't call
 self-referenced destructors until 5.3.

 Well as long as the object still exists, {{{__destructors}}} are never
 called because the object itself still exists, even if some variable that
 references a (one) instance is unset. That's by definition and
 [http://bugs.php.net/bug.php?id=33711 not a bug]. The Bug which - as quote
 here in trac and referenced
 [http://simplepie.org/wiki/faq/i_m_getting_memory_leaks there on the
 simplepie wiki] - was "fixed in 5.3"
 ([http://bugs.php.net/bug.php?id=33595 PHP BUG #33595]) is actually an
 improvement of the garbage collector (GC). The GC is called from time to
 time to free memory (but not explicitly on unset). As already written,
 it's the GC which is invoking the {{{__destruct()}}} function and those
 functions should never be manually called.

 In the discussion on the PHP ticket you find some similar comments like
 here in a more general sense.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11518#comment:22>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list