diff options
author | Eric Helgeson <erichelgeson@gmail.com> | 2009-10-19 20:08:20 -0400 |
---|---|---|
committer | Eric Helgeson <erichelgeson@gmail.com> | 2009-10-19 20:08:20 -0400 |
commit | 490dfc6f5a4480cda3fdee8af66ea4e856cdf0e8 (patch) | |
tree | c3367ac6dd2bbef10d088a8efb230f489c7efdf5 /lib | |
parent | 66fca9e2a87f9b9c55174694c79f567c5c81518a (diff) |
Better check if site,server is configured.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index 047faeef0..0052090f6 100644 --- a/lib/util.php +++ b/lib/util.php @@ -760,12 +760,18 @@ function common_path($relative, $ssl=false) if (is_string(common_config('site', 'sslserver')) && mb_strlen(common_config('site', 'sslserver')) > 0) { $serverpart = common_config('site', 'sslserver'); - } else { + } else if (common_config('site', 'server')) { $serverpart = common_config('site', 'server'); + } else { + common_log(LOG_ERR, 'Site Sever not configured, unable to determine site name.'); } } else { $proto = 'http'; - $serverpart = common_config('site', 'server'); + if (common_config('site', 'server')) { + $serverpart = common_config('site', 'server'); + } else { + common_log(LOG_ERR, 'Site Sever not configured, unable to determine site name.'); + } } return $proto.'://'.$serverpart.'/'.$pathpart.$relative; |