Skip to content

Commit a68f3d6

Browse files
1 parent 699e563 commit a68f3d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+44
-103
lines changed

ext/gd/gd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "ext/standard/info.h"
3535
#include "php_open_temporary_file.h"
3636
#include "php_memory_streams.h"
37+
#include "zend_attributes.h"
3738
#include "zend_object_handlers.h"
3839

3940
#ifdef HAVE_SYS_WAIT_H

ext/gd/gd.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, i
629629
/** @param resource|string|null $file */
630630
function imagebmp(GdImage $image, $file = null, bool $compressed = true): bool {}
631631

632+
#[\Deprecated(since: '8.5', message: "as it has no effect since PHP 8.0")]
632633
function imagedestroy(GdImage $image): true {}
633634

634635
function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {}

ext/gd/gd_arginfo.h

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/gd/tests/bug19366.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ echo "Alive: Send to browser\n";
3636
//Header("Content-type: image/PNG");
3737
//ImagePNG($ImHandle);
3838

39-
echo "Alive: Free resources\n";
40-
imagedestroy($ImHandle);
4139
echo "Alive: Done\n";
4240
?>
4341
--EXPECT--
@@ -46,5 +44,4 @@ Alive: Define colors
4644
Alive: Draw
4745
Alive: ImageString
4846
Alive: Send to browser
49-
Alive: Free resources
5047
Alive: Done

ext/gd/tests/bug28147.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ imagefilledrectangle($im,0,0,299,299,$w);
1616
imageantialias($im,true);
1717
imageline($im, 299, 299, 0, 299, $red);
1818

19-
imagedestroy($im);
20-
2119
echo "Alive\n";
2220
?>
2321
--EXPECT--

ext/gd/tests/bug36697-mb.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ imagecolortransparent($im, $trans_color);
1313
imagefilledrectangle($im, 0,0, 192,36, $trans_color);
1414
$c = imagecolorat($im, 191,35);
1515
imagegif($im, $dest);
16-
imagedestroy($im);
16+
$im = null;
1717
$im = imagecreatefromgif($dest);
1818
$c = imagecolorat($im, 191, 35);
1919
$colors = imagecolorsforindex($im, $c);

ext/gd/tests/bug36697.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ imagecolortransparent($im, $trans_color);
1313
imagefilledrectangle($im, 0,0, 192,36, $trans_color);
1414
$c = imagecolorat($im, 191,35);
1515
imagegif($im, $dest);
16-
imagedestroy($im);
16+
$im = null;
1717
$im = imagecreatefromgif($dest);
1818
$c = imagecolorat($im, 191, 35);
1919
$colors = imagecolorsforindex($im, $c);

ext/gd/tests/bug38179.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ imagecopy($dst_tc, $src, 0,0, 0,0, imagesx($src), imagesy($src));
1818

1919
$p1 = imagecolorat($dst_tc, 3,3);
2020
printf("%X\n", $p1);
21-
22-
imagedestroy($src); imagedestroy($dst_tc);
2321
?>
2422
--EXPECT--
2523
46FF0000

ext/gd/tests/bug42434.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ if (imagecolorat($im, 9, 0) == 0x000000) {
1515
} else {
1616
echo 'Bugged';
1717
}
18-
19-
imagedestroy($im);
2018
?>
2119
--EXPECT--
2220
DONE

ext/gd/tests/bug43121.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ $im_tile = ImageCreateFromGif(__DIR__ . "/bug43121.gif" );
1717
ImageSetTile( $im, $im_tile );
1818
ImageFill( $im, 0, 0, IMG_COLOR_TILED );
1919

20-
ImageDestroy( $im );
21-
2220
print "OK";
2321
?>
2422
--EXPECT--

0 commit comments

Comments
 (0)