]> granicus.if.org Git - php/commitdiff
Check the correct list
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 10 Aug 2020 19:52:36 +0000 (21:52 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 10 Aug 2020 19:52:36 +0000 (21:52 +0200)
This was supposed to check mx_list, not weight_list... oops.

ext/standard/dns.c

index 56fb83eadeb02e1497fea81074c7736c649cf0b6..937c0ef392106b57ecdd5039ce4b5566296b0342 100644 (file)
@@ -1114,7 +1114,7 @@ PHP_FUNCTION(dns_get_mx)
                }
        }
        php_dns_free_handle(handle);
-       RETURN_BOOL(zend_hash_num_elements(Z_ARRVAL_P(weight_list)) != 0);
+       RETURN_BOOL(zend_hash_num_elements(Z_ARRVAL_P(mx_list)) != 0);
 }
 /* }}} */
 #endif /* HAVE_FULL_DNS_FUNCS */