This commit is contained in:
Johnny 2022-06-28 00:57:42 +09:00
parent a7ca384a05
commit 27df638470
3 changed files with 11 additions and 11 deletions

View file

@ -558,8 +558,8 @@ class adminAdminView extends admin
{
Context::set('object_cache_host', parse_url(array_first($cache_servers), PHP_URL_HOST) ?: null);
Context::set('object_cache_port', parse_url(array_first($cache_servers), PHP_URL_PORT) ?: null);
Context::set('object_cache_user', parse_url(array_first($cache_servers), PHP_URL_USER) ?: null);
Context::set('object_cache_pass', parse_url(array_first($cache_servers), PHP_URL_PASS) ?: null);
Context::set('object_cache_user', parse_url(array_first($cache_servers), PHP_URL_USER) ?? '');
Context::set('object_cache_pass', parse_url(array_first($cache_servers), PHP_URL_PASS) ?? '');
$cache_dbnum = preg_replace('/[^\d]/', '', parse_url(array_first($cache_servers), PHP_URL_FRAGMENT) ?: parse_url(array_first($cache_servers), PHP_URL_PATH));
Context::set('object_cache_dbnum', $cache_dbnum === '' ? 1 : intval($cache_dbnum));
}