[doc-en] master: Document the ValueError of ftp_connect, ftp_ssl_connect and ftp_get_option (#6071)

From: Date: Thu, 12 Nov 2026 15:09:08 +0000
Subject: [doc-en] master: Document the ValueError of ftp_connect, ftp_ssl_connect and ftp_get_option (#6071)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23943@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-11-12T16:09:04+01:00 Commit: https://github.com/php/doc-en/commit/38221fa6de28e3035e7a3b18d8ec1c598e3087a2 Raw diff: https://github.com/php/doc-en/commit/38221fa6de28e3035e7a3b18d8ec1c598e3087a2.diff Document the ValueError of ftp_connect, ftp_ssl_connect and ftp_get_option (#6071) Changed paths: M reference/ftp/functions/ftp-connect.xml M reference/ftp/functions/ftp-get-option.xml M reference/ftp/functions/ftp-ssl-connect.xml Diff: diff --git a/reference/ftp/functions/ftp-connect.xml b/reference/ftp/functions/ftp-connect.xml index 9ab43c3897e0..dea0689a0ae5 100644 --- a/reference/ftp/functions/ftp-connect.xml +++ b/reference/ftp/functions/ftp-connect.xml @@ -60,6 +60,13 @@ Returns an <classname>FTP\Connection</classname> instance on success,&return.falseforfailure;. </para> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if + <parameter>timeout</parameter> is less than or equal to <literal>0</literal>. + </simpara> + </refsect1> <refsect1 role="changelog"> &reftitle.changelog; @@ -79,6 +86,14 @@ previously, a &resource; was returned. </entry> </row> + <row> + <entry>8.0.0</entry> + <entry> + A <exceptionname>ValueError</exceptionname> is now thrown if + <parameter>timeout</parameter> is less than or equal to <literal>0</literal>; + previously, an <constant>E_WARNING</constant> was emitted and &false; was returned. + </entry> + </row> </tbody> </tgroup> </informaltable> diff --git a/reference/ftp/functions/ftp-get-option.xml b/reference/ftp/functions/ftp-get-option.xml index e0ccb7a90277..3c625db28e9f 100644 --- a/reference/ftp/functions/ftp-get-option.xml +++ b/reference/ftp/functions/ftp-get-option.xml @@ -59,11 +59,17 @@ </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - Returns the value on success or &false; if the given - <parameter>option</parameter> is not supported. In the latter case, a - warning message is also thrown. - </para> + <simpara> + Returns the value of the requested <parameter>option</parameter>. + </simpara> + </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if + <parameter>option</parameter> is not <constant>FTP_TIMEOUT_SEC</constant>, + <constant>FTP_AUTOSEEK</constant>, or <constant>FTP_USEPASVADDRESS</constant>. + </simpara> </refsect1> <refsect1 role="changelog"> @@ -78,6 +84,14 @@ </thead> <tbody> &ftp.changelog.ftp-param; + <row> + <entry>8.0.0</entry> + <entry> + A <exceptionname>ValueError</exceptionname> is now thrown if + <parameter>option</parameter> is not supported; + previously, an <constant>E_WARNING</constant> was emitted and &false; was returned. + </entry> + </row> </tbody> </tgroup> </informaltable> diff --git a/reference/ftp/functions/ftp-ssl-connect.xml b/reference/ftp/functions/ftp-ssl-connect.xml index 6019ad2cc097..05af5c50719b 100644 --- a/reference/ftp/functions/ftp-ssl-connect.xml +++ b/reference/ftp/functions/ftp-ssl-connect.xml @@ -81,6 +81,13 @@ Returns an <classname>FTP\Connection</classname> instance on success,&return.falseforfailure;. </para> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if + <parameter>timeout</parameter> is less than or equal to <literal>0</literal>. + </simpara> + </refsect1> <refsect1 role="changelog"> &reftitle.changelog; @@ -100,6 +107,14 @@ previously, a &resource; was returned. </entry> </row> + <row> + <entry>8.0.0</entry> + <entry> + A <exceptionname>ValueError</exceptionname> is now thrown if + <parameter>timeout</parameter> is less than or equal to <literal>0</literal>; + previously, an <constant>E_WARNING</constant> was emitted and &false; was returned. + </entry> + </row> </tbody> </tgroup> </informaltable>

« previous php.doc.cvs (#23943) next »