WordPress.org

Make WordPress Core

Ticket #14046: WP_User.diff

File WP_User.diff, 686 bytes (added by francescolaffi, 4 years ago)

diff for 1st solution

  • wp-includes/capabilities.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: /Users/Francesco/NetBeansProjects/wptrunk/trunk
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    478478                if ( empty( $id ) && empty( $name ) ) 
    479479                        return; 
    480480 
    481                 if ( ! is_numeric( $id ) ) { 
     481                if ( empty( $name ) && ! is_numeric( $id ) ) { 
    482482                        $name = $id; 
    483483                        $id = 0; 
    484484                }