Skip to content

Commit b8b21af

Browse files
authored
[PHP 8.4] Add errors for GD functions (#164)
* [PHP 8.4] Add errors for GD functions * レビュー指摘部分の修正
1 parent 0ecd4d1 commit b8b21af

File tree

6 files changed

+116
-6
lines changed

6 files changed

+116
-6
lines changed

reference/image/functions/imageavif.xml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 4e04068f2de34363722fd5c76b2cf5b8844a48ef Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: mumumu Status: ready -->
44
<refentry xml:id="function.imageavif" xmlns="http://docbook.org/ns/docbook">
55
<refnamediv>
66
<refname>imageavif</refname>
@@ -70,6 +70,35 @@
7070
&gd.return.trueonerror;
7171
</refsect1>
7272

73+
<refsect1 role="errors">
74+
&reftitle.errors;
75+
<simpara>
76+
<parameter>quality</parameter> または、<parameter>speed</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
77+
</simpara>
78+
</refsect1>
79+
80+
<refsect1 role="changelog">
81+
&reftitle.changelog;
82+
<informaltable>
83+
<tgroup cols="2">
84+
<thead>
85+
<row>
86+
<entry>&Version;</entry>
87+
<entry>&Description;</entry>
88+
</row>
89+
</thead>
90+
<tbody>
91+
<row>
92+
<entry>8.4.0</entry>
93+
<entry>
94+
<parameter>quality</parameter> または、<parameter>speed</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
95+
</entry>
96+
</row>
97+
</tbody>
98+
</tgroup>
99+
</informaltable>
100+
</refsect1>
101+
73102
<refsect1 role="seealso">
74103
&reftitle.seealso;
75104
<simplelist>

reference/image/functions/imagefilter.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.imagefilter" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -237,6 +237,16 @@
237237
&return.success;
238238
</para>
239239
</refsect1>
240+
241+
<refsect1 role="errors">
242+
&reftitle.errors;
243+
<simpara>
244+
<constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter> で
245+
<parameter>sub</parameter> または <parameter>plus</parameter> がオーバーフローやアンダーフローを引き起こす場合、
246+
<classname>ValueError</classname> をスローします。
247+
</simpara>
248+
</refsect1>
249+
240250
<refsect1 role="changelog">
241251
&reftitle.changelog;
242252
<para>
@@ -249,6 +259,14 @@
249259
</row>
250260
</thead>
251261
<tbody>
262+
<row>
263+
<entry>8.4.0</entry>
264+
<entry>
265+
<constant>IMG_FILTER_SCATTER</constant> <parameter>filter</parameter> で
266+
<parameter>sub</parameter> または <parameter>plus</parameter> がオーバーフローやアンダーフローを引き起こす場合、
267+
<classname>ValueError</classname> をスローするようになりました。
268+
</entry>
269+
</row>
252270
&gd.changelog.image-param;
253271
<row>
254272
<entry>7.4.0</entry>

reference/image/functions/imagejpeg.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 80b2563f1fb2e2830f6881b4620adf773065f9e7 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="function.imagejpeg" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -53,6 +53,13 @@
5353
&gd.return.trueonerror;
5454
</refsect1>
5555

56+
<refsect1 role="errors">
57+
&reftitle.errors;
58+
<simpara>
59+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
60+
</simpara>
61+
</refsect1>
62+
5663
<refsect1 role="changelog">
5764
&reftitle.changelog;
5865
<informaltable>
@@ -65,6 +72,12 @@
6572
</thead>
6673
<tbody>
6774
&gd.changelog.image-param;
75+
<row>
76+
<entry>8.4.0</entry>
77+
<entry>
78+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
79+
</entry>
80+
</row>
6881
</tbody>
6982
</tgroup>
7083
</informaltable>

reference/image/functions/imagepng.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="function.imagepng" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -80,6 +80,13 @@
8080
&gd.return.trueonerror;
8181
</refsect1>
8282

83+
<refsect1 role="errors">
84+
&reftitle.errors;
85+
<simpara>
86+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
87+
</simpara>
88+
</refsect1>
89+
8390
<refsect1 role="changelog">
8491
&reftitle.changelog;
8592
<informaltable>
@@ -91,6 +98,12 @@
9198
</row>
9299
</thead>
93100
<tbody>
101+
<row>
102+
<entry>8.4.0</entry>
103+
<entry>
104+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
105+
</entry>
106+
</row>
94107
&gd.changelog.image-param;
95108
</tbody>
96109
</tgroup>

reference/image/functions/imagescale.xml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
55

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

81+
<refsect1 role="errors">
82+
&reftitle.errors;
83+
<simpara>
84+
<parameter>width</parameter> または <parameter>height</parameter> がオーバーフローやアンダーフローを引き起こす場合、
85+
<classname>ValueError</classname> をスローします。
86+
</simpara>
87+
<simpara>
88+
<parameter>mode</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
89+
</simpara>
90+
</refsect1>
91+
8192
<refsect1 role="changelog">
8293
&reftitle.changelog;
8394
<informaltable>
@@ -89,6 +100,19 @@
89100
</row>
90101
</thead>
91102
<tbody>
103+
<row>
104+
<entry>8.4.0</entry>
105+
<entry>
106+
<parameter>width</parameter> または <parameter>height</parameter> がオーバーフローやアンダーフローを引き起こす場合でも、
107+
<classname>ValueError</classname> をスローしません。
108+
</entry>
109+
</row>
110+
<row>
111+
<entry>8.4.0</entry>
112+
<entry>
113+
<parameter>mode</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
114+
</entry>
115+
</row>
92116
<row>
93117
<entry>8.0.0</entry>
94118
<entry>

reference/image/functions/imagewebp.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.imagewebp" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -54,6 +54,13 @@
5454
&gd.return.trueonerror;
5555
</refsect1>
5656

57+
<refsect1 role="errors">
58+
&reftitle.errors;
59+
<simpara>
60+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローします。
61+
</simpara>
62+
</refsect1>
63+
5764
<refsect1 role="changelog">
5865
&reftitle.changelog;
5966
<informaltable>
@@ -65,6 +72,12 @@
6572
</row>
6673
</thead>
6774
<tbody>
75+
<row>
76+
<entry>8.4.0</entry>
77+
<entry>
78+
<parameter>quality</parameter> が不正の場合、 <classname>ValueError</classname> をスローするようになりました。
79+
</entry>
80+
</row>
6881
&gd.changelog.image-param;
6982
</tbody>
7083
</tgroup>

0 commit comments

Comments
 (0)