Skip to content

Commit 3b8dc33

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix FTP tests for Travis CI.
2 parents d454730 + 4700745 commit 3b8dc33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/ftp/tests/server.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ $context = stream_context_create(array('ssl' => array('local_cert' => dirname(__
77
for ($i=0; $i<10 && !$socket; ++$i) {
88
$port = rand(50000, 65535);
99

10-
$socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
10+
@$socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
1111
}
1212
//set anther random port that is not the same as $port
1313
do{
1414
$pasv_port = rand(50000, 65535);
1515
}while($pasv_port == $port);
1616

1717
if (!$socket) {
18+
echo "$errstr ($errno)\n";
1819
die("could not start/bind the ftp server\n");
1920
}
2021

0 commit comments

Comments
 (0)