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:
parent
0f06334e11
commit
8edd1656f7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue