Skip to content

Commit

Permalink
[PHP 8.4] Add errors for GD functions (#3962)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
  • Loading branch information
saundefined and cmb69 authored Oct 29, 2024
1 parent 71618f8 commit ccd3e68
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 0 deletions.
31 changes: 31 additions & 0 deletions reference/image/functions/imageavif.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,37 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname> if <parameter>quality</parameter>
or <parameter>speed</parameter> is invalid.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>quality</parameter>
or <parameter>speed</parameter> is invalid.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
Expand Down
18 changes: 18 additions & 0 deletions reference/image/functions/imagefilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@
&return.success;
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname>
if <parameter>sub</parameter> or <parameter>plus</parameter> would cause over-/underflow
with the <constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter>.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
Expand All @@ -246,6 +256,14 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname>
if <parameter>sub</parameter> or <parameter>plus</parameter> would cause over-/underflow
with the <constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter>.
</entry>
</row>
&gd.changelog.image-param;
<row>
<entry>7.4.0</entry>
Expand Down
13 changes: 13 additions & 0 deletions reference/image/functions/imagejpeg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -61,6 +68,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</entry>
</row>
&gd.changelog.image-param;
</tbody>
</tgroup>
Expand Down
13 changes: 13 additions & 0 deletions reference/image/functions/imagepng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -86,6 +93,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</entry>
</row>
&gd.changelog.image-param;
</tbody>
</tgroup>
Expand Down
24 changes: 24 additions & 0 deletions reference/image/functions/imagescale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname> if <parameter>width</parameter>
or <parameter>height</parameter> would cause over-/underflow.
</simpara>
<simpara>
Throws a <classname>ValueError</classname> if <parameter>mode</parameter> is invalid.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -87,6 +98,19 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>width</parameter>
or <parameter>height</parameter> would cause over-/underflow.
</entry>
</row>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>mode</parameter> is invalid.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
Expand Down
13 changes: 13 additions & 0 deletions reference/image/functions/imagewebp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
Throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -62,6 +69,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if <parameter>quality</parameter> is invalid.
</entry>
</row>
&gd.changelog.image-param;
</tbody>
</tgroup>
Expand Down

0 comments on commit ccd3e68

Please sign in to comment.