- Patch #150452 by JohnAlbin: fixed strict notice.

6.x
Dries Buytaert 2007-06-09 07:26:36 +00:00
parent b0f759516a
commit c83f05e284
1 changed files with 2 additions and 1 deletions

View File

@ -311,7 +311,8 @@ function conf_init() {
if (strpos($cookie_domain, 'www.') === 0) { if (strpos($cookie_domain, 'www.') === 0) {
$cookie_domain = substr($cookie_domain, 4); $cookie_domain = substr($cookie_domain, 4);
} }
$cookie_domain = '.'. array_shift(explode(':', $cookie_domain)); $cookie_domain = explode(':', $cookie_domain);
$cookie_domain = '.'. array_shift($cookie_domain);
// Per RFC 2109, cookie domains must contain at least one dot other than the // Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost' or IP Addresses we don't set a cookie domain. // first. For hosts such as 'localhost' or IP Addresses we don't set a cookie domain.
if (count(explode('.', $cookie_domain)) > 2 && !is_numeric(str_replace('.', '', $cookie_domain))) { if (count(explode('.', $cookie_domain)) > 2 && !is_numeric(str_replace('.', '', $cookie_domain))) {