aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:32:49 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:32:49 +0000
commit337f1c33c9ee760db180d0628e756bed61c75020 (patch)
tree0e50bd2d264d9ffec83235656a1c8c8fac81a19a /phpBB/includes
parente1d5f76848be9564989e60189b31c5c4c4f673d7 (diff)
downloadforums-337f1c33c9ee760db180d0628e756bed61c75020.tar
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.gz
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.bz2
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.xz
forums-337f1c33c9ee760db180d0628e756bed61c75020.zip
Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8449 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_messenger.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index be78ad2999..90dbc33363 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1056,8 +1056,7 @@ class smtp_class
global $user;
$err_msg = '';
- $local_host = php_uname('n');
- $local_host = (empty($local_host)) ? 'localhost' : $local_host;
+ $local_host = (function_exists('php_uname')) ? php_uname('n') : $user->host;
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated
@@ -1332,7 +1331,7 @@ class smtp_class
// Realm
if (empty($tokens['realm']))
{
- $tokens['realm'] = php_uname('n');
+ $tokens['realm'] = (function_exists('php_uname')) ? php_uname('n') : $user->host;
}
// Maxbuf