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

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 15 15:21:41 UTC 2010


#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 miqrogroove):

 Replying to [comment:24 hakre]:
 > Just to add a counter-point from the other direction:
 >
 > It is bad practice to use the magic function {{{__destruct()}}} for any
 other purpose than the intended one.

 I believe that's a misinterpretation of the docs.  What the PHP docs say
 literally is not to use function names beginning with __ unless you want
 the magic behavior for that function.  I've never seen anything that says
 you can't or shouldn't call on a magic function.

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


More information about the wp-trac mailing list