Skip to content

Commit 492093a

Browse files
authored
QA - ftp_connect - error behavior when connection fails
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-9002.
1 parent 7b301e3 commit 492093a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ext/ftp/tests/ftp_connect_001.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
ftp_connect - return FALSE if connection fails and Waning is generated
3+
--EXTENSIONS--
4+
ftp
5+
--FILE--
6+
<?php
7+
$ftp = ftp_connect('dummy-host-name', 21, 5);
8+
var_dump($ftp);
9+
?>
10+
--EXPECTF--
11+
Warning: ftp_connect(): php_network_getaddresses: getaddrinfo for dummy-host-name failed: %s in %s on line %d
12+
bool(false)

0 commit comments

Comments
 (0)