Skip to content

Commit

Permalink
Merge branch 'PHP-5.4'
Browse files Browse the repository at this point in the history
* PHP-5.4:
  Fix test on FreeBSD and other systems that have /etc/services
  • Loading branch information
bjori committed Mar 24, 2012
2 parents 54d82a9 + 1080968 commit 6519665
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/standard/tests/general_functions/getservbyport_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Michele Orselli ([email protected])
Simone Gentili ([email protected])
--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");

Expand Down

0 comments on commit 6519665

Please sign in to comment.