From 33b1c570921d07e0ea1ac492ca6d7b48f6cbd7d5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 25 Oct 2016 23:32:24 -0700 Subject: 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. --- include/network.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/network.php') 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; -- cgit v1.2.3