This commit is contained in:
Jani Taskinen 2007-11-05 13:40:36 +00:00
parent f376208431
commit 32e04e4f7c

View File

@ -263,8 +263,7 @@ PHP_FUNCTION(dns_check_record)
return;
}
if (hostname_len == 0)
{
if (hostname_len == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be empty");
RETURN_FALSE;
}
@ -692,8 +691,10 @@ PHP_FUNCTION(dns_get_record)
* NUMTYPES+1 when results were already fetched.
* - In case of PHP_DNS_ANY we use the directly fetch DNS_T_ANY. (step NUMTYPES+1 )
*/
for(type = (type_param==PHP_DNS_ANY ? (PHP_DNS_NUM_TYPES + 1) : 0); type < (addtl_recs ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query; type++)
{
for (type = (type_param == PHP_DNS_ANY ? (PHP_DNS_NUM_TYPES + 1) : 0);
type < (addtl_recs ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query;
type++
) {
first_query = 0;
switch (type) {
case 0: