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.

This commit is contained in:
zotlabs 2016-10-25 23:32:24 -07:00
parent 441d3bf1ed
commit 33b1c57092

View File

@ -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;