[wp-trac] [WordPress Trac] #14814: Allow WP XML-RPC Library to be Extended

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 9 09:07:09 UTC 2010


#14814: Allow WP XML-RPC Library to be Extended
--------------------------+-------------------------------------------------
 Reporter:  filosofo      |       Owner:  filosofo 
     Type:  defect (bug)  |      Status:  assigned 
 Priority:  normal        |   Milestone:  3.1      
Component:  XML-RPC       |     Version:  3.1      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:16 filosofo]:
 > I think you're just thrown off by the way the diff is rendered. Apply my
 patch, and you'll see the following at the bottom of xmlrpc.php:

 I had missed that indeed. Nevermind. :-P

 > I'm assuming empty is much faster than class_exists.  Do you think
 that's unreasonable?

 As far as using empty() instead of checking the variable, I'd say yes.

 {{{
 // fast, but raises notices if $var is not declared:
 $var && foo();
 // fast, without raising notices:
 isset($var) && $var && foo()
 // slower, but less verbose:
 !empty($var) && foo();
 }}}

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


More information about the wp-trac mailing list