Skip to content

Commit 574a7e7

Browse files
committed
ext/ftp fix ftp_nb_get signature (for failure).
ref: php/doc-en#2331 (comment) Closes GH-10760.
1 parent 7fcea9d commit 574a7e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/ftp/ftp.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mo
6767
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
6868
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
6969
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
70-
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
70+
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
7171
function ftp_nb_continue(FTP\Connection $ftp): int {}
7272

7373
/** @param resource $stream */

ext/ftp/ftp_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 2b1726dd5652839a37e533e20dfcf6782b3c766d */
2+
* Stub hash: a39d0e3d9675fee29822c7bf491494fe5bc0b694 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTP\\Connection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
@@ -107,7 +107,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_get, 0, 3, _IS_BOOL, 0)
107107
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
108108
ZEND_END_ARG_INFO()
109109

110-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_nb_get, 0, 3, IS_LONG, 0)
110+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_get, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
111111
ZEND_ARG_OBJ_INFO(0, ftp, FTP\\Connection, 0)
112112
ZEND_ARG_TYPE_INFO(0, local_filename, IS_STRING, 0)
113113
ZEND_ARG_TYPE_INFO(0, remote_filename, IS_STRING, 0)

0 commit comments

Comments
 (0)