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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-08-24 19:47:35 +00:00
parent 0f06334e11
commit 8edd1656f7
1 changed files with 1 additions and 1 deletions

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;
}