[wp-trac] [WordPress Trac] #41697: Unused parameter in function is_user_option_local

WordPress Trac noreply at wordpress.org
Tue Aug 22 12:09:57 UTC 2017


#41697: Unused parameter in function is_user_option_local
--------------------------------+------------------------------
 Reporter:  bnap00              |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  3.0
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by spacedmonkey):

 Fix it. Something like this should work.
 {{{#!php
 function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
     global $wpdb;
     if ( $user_id && is_numeric( $user_id ) ) {
          $current_user = get_user_by( 'id', $user_id );
     } else{
         $current_user = wp_get_current_user();
     }

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41697#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list