Skip to content

Commit

Permalink
QA - ftp_connect - error behavior when connection fails
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-9002.
  • Loading branch information
juan-morales committed Jul 14, 2022
1 parent 7b301e3 commit 492093a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ext/ftp/tests/ftp_connect_001.phpt
@@ -0,0 +1,12 @@
--TEST--
ftp_connect - return FALSE if connection fails and Waning is generated
--EXTENSIONS--
ftp
--FILE--
<?php
$ftp = ftp_connect('dummy-host-name', 21, 5);
var_dump($ftp);
?>
--EXPECTF--
Warning: ftp_connect(): php_network_getaddresses: getaddrinfo for dummy-host-name failed: %s in %s on line %d
bool(false)

0 comments on commit 492093a

Please sign in to comment.