Make WordPress Core

Changeset 18598


Ignore:
Timestamp:
08/24/2011 07:47:35 PM (13 years ago)
Author:
ryan
Message:

Handle null user ID in the WP_User constructor. Props kawauso. fixes #17894

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r18597 r18598  
    441441     */
    442442    function __construct( $id = 0, $name = '', $blog_id = '' ) {
    443         if ( ! is_numeric( $id ) ) {
     443        if ( ! empty( $id ) && ! is_numeric( $id ) ) {
    444444            $name = $id;
    445445            $id = 0;
Note: See TracChangeset for help on using the changeset viewer.