pajoye                                   Sun, 04 Sep 2011 21:48:22 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316116

Log:
- unify warning between win and unix and enable test

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c
    U   php/php-src/branches/PHP_5_3/ext/standard/tests/network/bug41347.phpt
    U   php/php-src/branches/PHP_5_4/ext/standard/dns_win32.c
    U   php/php-src/branches/PHP_5_4/ext/standard/tests/network/bug41347.phpt
    U   php/php-src/trunk/ext/standard/dns_win32.c
    U   php/php-src/trunk/ext/standard/tests/network/bug41347.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c       2011-09-04 
21:40:22 UTC (rev 316115)
+++ php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c       2011-09-04 
21:48:22 UTC (rev 316116)
@@ -103,6 +103,11 @@
                return;
        }

+       if (hostname_len == 0) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be 
empty");
+               RETURN_FALSE;
+       }
+
        if (rectype) {
                     if (!strcasecmp("A",     rectype)) type = DNS_TYPE_A;
                else if (!strcasecmp("NS",    rectype)) type = DNS_TYPE_NS;

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/network/bug41347.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/network/bug41347.phpt       
2011-09-04 21:40:22 UTC (rev 316115)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/network/bug41347.phpt       
2011-09-04 21:48:22 UTC (rev 316116)
@@ -1,11 +1,5 @@
 --TEST--
 dns_check_record() segfault with empty host
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip No windows support');
-}
-?>
 --FILE--
 <?php
 var_dump(dns_check_record(''));

Modified: php/php-src/branches/PHP_5_4/ext/standard/dns_win32.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/dns_win32.c       2011-09-04 
21:40:22 UTC (rev 316115)
+++ php/php-src/branches/PHP_5_4/ext/standard/dns_win32.c       2011-09-04 
21:48:22 UTC (rev 316116)
@@ -103,6 +103,11 @@
                return;
        }

+       if (hostname_len == 0) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be 
empty");
+               RETURN_FALSE;
+       }
+
        if (rectype) {
                     if (!strcasecmp("A",     rectype)) type = DNS_TYPE_A;
                else if (!strcasecmp("NS",    rectype)) type = DNS_TYPE_NS;

Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/network/bug41347.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/network/bug41347.phpt       
2011-09-04 21:40:22 UTC (rev 316115)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/network/bug41347.phpt       
2011-09-04 21:48:22 UTC (rev 316116)
@@ -1,11 +1,5 @@
 --TEST--
 dns_check_record() segfault with empty host
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip No windows support');
-}
-?>
 --FILE--
 <?php
 var_dump(dns_check_record(''));

Modified: php/php-src/trunk/ext/standard/dns_win32.c
===================================================================
--- php/php-src/trunk/ext/standard/dns_win32.c  2011-09-04 21:40:22 UTC (rev 
316115)
+++ php/php-src/trunk/ext/standard/dns_win32.c  2011-09-04 21:48:22 UTC (rev 
316116)
@@ -103,6 +103,11 @@
                return;
        }

+       if (hostname_len == 0) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be 
empty");
+               RETURN_FALSE;
+       }
+
        if (rectype) {
                     if (!strcasecmp("A",     rectype)) type = DNS_TYPE_A;
                else if (!strcasecmp("NS",    rectype)) type = DNS_TYPE_NS;

Modified: php/php-src/trunk/ext/standard/tests/network/bug41347.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/network/bug41347.phpt  2011-09-04 
21:40:22 UTC (rev 316115)
+++ php/php-src/trunk/ext/standard/tests/network/bug41347.phpt  2011-09-04 
21:48:22 UTC (rev 316116)
@@ -1,11 +1,5 @@
 --TEST--
 dns_check_record() segfault with empty host
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip No windows support');
-}
-?>
 --FILE--
 <?php
 var_dump(dns_check_record(''));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to