From 223b9ed0d69ab9482dbf0125afb73ef6c569aa16 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 17 Sep 2009 13:39:50 +0000 Subject: [PATCH] extend r9387 - check for existance of all functions we use... git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10158 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_messenger.php | 2 +- phpBB/includes/session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 0d1c215cb1..909609d893 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1134,7 +1134,7 @@ class smtp_class global $user; $err_msg = ''; - $local_host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host; + $local_host = (function_exists('php_uname') && function_exists('gethostbyaddr') && function_exists('gethostbyname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host; // If we are authenticating through pop-before-smtp, we // have to login ones before we get authenticated diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index dcfde14159..d8362d5089 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -182,7 +182,7 @@ class session else { // Set to OS hostname or localhost - $host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost'; + $host = (function_exists('php_uname') && function_exists('gethostbyaddr') && function_exists('gethostbyname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost'; } }