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

git-svn-id: https://develop.svn.wordpress.org/trunk@18598 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-08-24 19:47:35 +00:00
parent 1d3e616495
commit 9e2aa32657

View File

@ -440,7 +440,7 @@ class WP_User {
* @return WP_User
*/
function __construct( $id = 0, $name = '', $blog_id = '' ) {
if ( ! is_numeric( $id ) ) {
if ( ! empty( $id ) && ! is_numeric( $id ) ) {
$name = $id;
$id = 0;
}