summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2012-03-24 17:59:52 +0100
committerHannes Magnusson <bjori@php.net>2012-03-24 17:59:52 +0100
commit10809686f0dbcbbf0eb06c968d65e0febe1dc034 (patch)
tree01d7fcd9f023b4cf2cd03823ac3828cc837350dc
parent7a1c76538541e74719faf2311d72a70acd3c01e4 (diff)
parent948d326b294becccf1e1a34851bce380f2381b96 (diff)
downloadphp-git-10809686f0dbcbbf0eb06c968d65e0febe1dc034.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fix test on FreeBSD and other systems that have /etc/services
-rw-r--r--ext/standard/tests/general_functions/getservbyport_basic.phpt5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/standard/tests/general_functions/getservbyport_basic.phpt b/ext/standard/tests/general_functions/getservbyport_basic.phpt
index 1695455ab1..b9e0f83c98 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 (mo@ideato.it)
Simone Gentili (sensorario@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");