File tree 1 file changed +17
-6
lines changed
1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -897,13 +897,24 @@ PHP_FUNCTION(dns_get_record)
897
897
898
898
if (n < 0 ) {
899
899
php_dns_free_handle (handle );
900
- if (h_errno == NO_DATA || h_errno == HOST_NOT_FOUND ) {
901
- continue ;
902
- } else {
903
- php_error_docref (NULL TSRMLS_CC , E_WARNING , "DNS Query failed ");
904
- zval_dtor (return_value );
905
- RETURN_FALSE ;
900
+ switch (h_errno ) {
901
+ case NO_DATA :
902
+ case HOST_NOT_FOUND :
903
+ continue ;
904
+
905
+ case NO_RECOVERY :
906
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "An unexpected server failure occurred." );
907
+ break ;
908
+
909
+ case TRY_AGAIN :
910
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "A temporary server error occurred." );
911
+ break ;
912
+
913
+ default :
914
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "DNS Query failed ");
906
915
}
916
+ zval_dtor (return_value );
917
+ RETURN_FALSE ;
907
918
}
908
919
909
920
cp = answer .qb2 + HFIXEDSZ ;
You can’t perform that action at this time.
0 commit comments