Commit: 948d326b294becccf1e1a34851bce380f2381b96 Author: Hannes Magnusson <bj...@php.net> Sat, 24 Mar 2012 17:58:40 +0100 Parents: 4fc4dd8760ddd8a53df9b59921093cc6b523154e Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=948d326b294becccf1e1a34851bce380f2381b96 Log: Fix test on FreeBSD and other systems that have /etc/services Changed paths: M ext/standard/tests/general_functions/getservbyport_basic.phpt Diff: 948d326b294becccf1e1a34851bce380f2381b96 diff --git a/ext/standard/tests/general_functions/getservbyport_basic.phpt b/ext/standard/tests/general_functions/getservbyport_basic.phpt index 1695455..b9e0f83 100644 --- a/ext/standard/tests/general_functions/getservbyport_basic.phpt +++ b/ext/standard/tests/general_functions/getservbyport_basic.phpt @@ -7,8 +7,9 @@ Michele Orselli (m...@ideato.it) Simone Gentili (sensora...@gmail.com) --FILE-- <?php - if(stristr(PHP_OS, "linux")) $file = "/etc/services"; - elseif(stristr(PHP_OS, "Darwin")) $file = "/etc/services"; + if (file_exists("/etc/services")) { + $file = "/etc/services"; + } elseif(substr(PHP_OS,0,3) == "WIN") $file = "C:/WINDOWS/system32/drivers/etc/services"; else die(PHP_OS. " unsupported"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php