From 9ff3459d7be09d1378d703cf61ecc658aa25a22f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 20 Nov 2012 08:29:38 +0100 Subject: Check if checkdnsrr() and getmxrr() functions exist before using them --- program/include/rcube_utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/include') diff --git a/program/include/rcube_utils.php b/program/include/rcube_utils.php index dfaa9b943..fd5bda676 100644 --- a/program/include/rcube_utils.php +++ b/program/include/rcube_utils.php @@ -134,12 +134,12 @@ class rcube_utils } // find MX record(s) - if (getmxrr($domain_part, $mx_records)) { + if (!function_exists('getmxrr') || getmxrr($domain_part, $mx_records)) { return true; } // find any DNS record - if (checkdnsrr($domain_part, 'ANY')) { + if (!function_exists('checkdnsrr') || checkdnsrr($domain_part, 'ANY')) { return true; } } -- cgit v1.2.3