Index: branches/MobileFrontend-API/MobileFrontend.body.php |
— | — | @@ -711,7 +711,7 @@ |
712 | 712 | $domainParts = array_reverse( $domainParts ); |
713 | 713 | // Although some browsers will accept cookies without the initial ., » RFC 2109 requires it to be included. |
714 | 714 | wfProfileOut( __METHOD__ ); |
715 | | - return '.' . $domainParts[1] . '.' . $domainParts[0]; |
| 715 | + return count( $domainParts ) >= 2 ? '.' . $domainParts[1] . '.' . $domainParts[0] : $_SERVER['HTTP_HOST']; |
716 | 716 | } |
717 | 717 | wfProfileOut( __METHOD__ ); |
718 | 718 | return $_SERVER['HTTP_HOST']; |