aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-25 23:32:24 -0700
committerzotlabs <mike@macgirvin.com>2016-10-25 23:32:24 -0700
commit33b1c570921d07e0ea1ac492ca6d7b48f6cbd7d5 (patch)
treeedb1fe08e7e77e6aa173c3a450ee63220be6b5b4
parent441d3bf1ed945aeea1c32a4139778ef67d0af739 (diff)
downloadvolse-hubzilla-33b1c570921d07e0ea1ac492ca6d7b48f6cbd7d5.tar.gz
volse-hubzilla-33b1c570921d07e0ea1ac492ca6d7b48f6cbd7d5.tar.bz2
volse-hubzilla-33b1c570921d07e0ea1ac492ca6d7b48f6cbd7d5.zip
For z_dns_check() use config values from memory and ignore DB - as this function can be called in the early stages of Setup when we first try to connect to the database.
-rw-r--r--include/network.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index 8c118eff3..24e77527f 100644
--- a/include/network.php
+++ b/include/network.php
@@ -486,8 +486,13 @@ function z_dns_check($h,$check_mx = 0) {
// dns_get_record() has issues on some platforms
// so allow somebody to ignore it completely
+ // Use config values from memory as this can be called during setup
+ // before a database or even any config structure exists.
- if(get_config('system','do_not_check_dns'))
+ if(is_array(\App::$config) && array_key_exists('system',\App::$config)
+ && is_array(\App::$config['system'])
+ && array_key_exists('do_not_check_dns',\App::$config['system'])
+ && \App::$config['system']['do_not_check_dns'])
return true;
$opts = DNS_A + DNS_CNAME + DNS_PTR;