Skip to content

[PHP 8.4] Add errors for GD functions #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion reference/image/functions/imageavif.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4e04068f2de34363722fd5c76b2cf5b8844a48ef Maintainer: mumumu Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: mumumu Status: ready -->
<refentry xml:id="function.imageavif" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imageavif</refname>
Expand Down Expand Up @@ -70,6 +70,35 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<parameter>quality</parameter> または、<parameter>speed</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
</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>
<parameter>quality</parameter> または、<parameter>speed</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
Expand Down
20 changes: 19 additions & 1 deletion reference/image/functions/imagefilter.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.imagefilter" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -237,6 +237,16 @@
&return.success;
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter> で
<parameter>sub</parameter> または <parameter>plus</parameter> がオーバーフローやアンダーフローを引き起こす場合、
<classname>ValueError</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
Expand All @@ -249,6 +259,14 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter> で
<parameter>sub</parameter> または <parameter>plus</parameter> がオーバーフローやアンダーフローを引き起こす場合、
<classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
&gd.changelog.image-param;
<row>
<entry>7.4.0</entry>
Expand Down
15 changes: 14 additions & 1 deletion reference/image/functions/imagejpeg.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 80b2563f1fb2e2830f6881b4620adf773065f9e7 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.imagejpeg" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -53,6 +53,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -65,6 +72,12 @@
</thead>
<tbody>
&gd.changelog.image-param;
<row>
<entry>8.4.0</entry>
<entry>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
Expand Down
15 changes: 14 additions & 1 deletion reference/image/functions/imagepng.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.imagepng" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -80,6 +80,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -91,6 +98,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
&gd.changelog.image-param;
</tbody>
</tgroup>
Expand Down
26 changes: 25 additions & 1 deletion reference/image/functions/imagescale.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->

<refentry xml:id="function.imagescale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -78,6 +78,17 @@
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<parameter>width</parameter> または <parameter>height</parameter> がオーバーフローやアンダーフローを引き起こす場合、
<classname>ValueError</classname> をスローします。
</simpara>
<simpara>
<parameter>mode</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -89,6 +100,19 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>width</parameter> または <parameter>height</parameter> がオーバーフローやアンダーフローを引き起こす場合でも、
<classname>ValueError</classname> をスローしません。
</entry>
</row>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>mode</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
Expand Down
15 changes: 14 additions & 1 deletion reference/image/functions/imagewebp.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.imagewebp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -54,6 +54,13 @@
&gd.return.trueonerror;
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -65,6 +72,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
</entry>
</row>
&gd.changelog.image-param;
</tbody>
</tgroup>
Expand Down